#108034 - 2003-11-17 01:45 PM
Email adress
|
mirsa3615
Fresh Scripter
Registered: 2003-01-08
Posts: 12
|
Can someone teel me how to get the email adress of the user? thanks
|
|
Top
|
|
|
|
#108035 - 2003-11-17 01:47 PM
Re: Email adress
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
besides asking them?
You need to provide a bit more detail about your network configuration (active directory??) and mail server
|
|
Top
|
|
|
|
#108036 - 2003-11-17 01:49 PM
Re: Email adress
|
mirsa3615
Fresh Scripter
Registered: 2003-01-08
Posts: 12
|
We are in AD configuration.
|
|
Top
|
|
|
|
#108037 - 2003-11-17 02:02 PM
Re: Email adress
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
I'm not going to sit here and try to pry info out of you. Have you read the FAQ forum... specifically the ones related to new users of this forum.
what mail server are you running? is it AD integrated? is the email address in AD user properties?
|
|
Top
|
|
|
|
#108038 - 2003-11-17 03:01 PM
Re: Email adress
|
mirsa3615
Fresh Scripter
Registered: 2003-01-08
Posts: 12
|
The email server is not integrated in AD bat the email adress is present in the user properties. thanks in advance
|
|
Top
|
|
|
|
#108039 - 2003-11-17 08:23 PM
Re: Email adress
|
Radimus
Moderator
   
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
Code:
$Userldap = TranslateName(1, @domain, 3, @domain+'\'+@userid, 1)
$UserProperties = GetObject("LDAP://"+$Userldap)
$FirstName = $userProperties.FirstName
$LastName = $userProperties.LastName
$Description = $userProperties.Description
$emailaddr = $userProperties.mail
$UserProperties = 0
you'll need the translatename UDF from the UDF forum
|
|
Top
|
|
|
|
#108040 - 2003-11-18 05:19 PM
Re: Email adress
|
Scooterboy
Lurker
Registered: 2003-03-13
Posts: 4
Loc: United Kingdom
|
The following is the code i use for my popmeail accounts and is based on the user login id/mail address being the same. OS = Win2k MailClient = Outlook2000
$maildomain = "@@thedomain.com" $pop = "mail" $smtp = "mailout" $rc = AddKey("HKCU\Software\Microsoft\Office\Outlook\OMI Account Manager\Accounts\00000001") $rc = WriteValue("HKCU\Software\Microsoft\Office\Outlook\OMI Account Manager\Accounts\00000001", "Account Name", "@DOMAIN", "REG_SZ") $rc = WriteValue("HKCU\Software\Microsoft\Office\Outlook\OMI Account Manager\Accounts\00000001", "Connection Type", "0", "REG_DWORD") $rc = WriteValue("HKCU\Software\Microsoft\Office\Outlook\OMI Account Manager\Accounts\00000001", "POP3 Prompt for Password", "0", "REG_DWORD") $rc = WriteValue("HKCU\Software\Microsoft\Office\Outlook\OMI Account Manager\Accounts\00000001", "POP3 Server", "$POP", "REG_SZ") $rc = WriteValue("HKCU\Software\Microsoft\Office\Outlook\OMI Account Manager\Accounts\00000001", "POP3 Use Sicily", "0", "REG_DWORD") $rc = WriteValue("HKCU\Software\Microsoft\Office\Outlook\OMI Account Manager\Accounts\00000001", "POP3 User Name", "@USERID", "REG_SZ") $rc = WriteValue("HKCU\Software\Microsoft\Office\Outlook\OMI Account Manager\Accounts\00000001", "SMTP Display Name", "@FULLNAME", "REG_SZ") $rc = WriteValue("HKCU\Software\Microsoft\Office\Outlook\OMI Account Manager\Accounts\00000001", "SMTP Email Address", "@USERID" + "$maildomain", "REG_SZ") $rc = WriteValue("HKCU\Software\Microsoft\Office\Outlook\OMI Account Manager\Accounts\00000001", "SMTP Server", "$SMTP", "REG_SZ") ; ; Set the email sending and retrieval options - Office2k ; $rc = WriteValue("HKCU\Software\Microsoft\Office\9.0\Outlook\Options\Mail", "Always hide dialog", "1", "REG_DWORD") $rc = WriteValue("HKCU\Software\Microsoft\Office\9.0\Outlook\Options\Mail", "Poll For Mail", "1", "REG_DWORD") $rc = WriteValue("HKCU\Software\Microsoft\Office\9.0\Outlook\Options\Mail", "Poll For Mail Interval", "5", "REG_DWORD") $rc = WriteValue("HKCU\Software\Microsoft\Office\9.0\Outlook\Options\Mail", "Send Mail Immediately", "1", "REG_DWORD") ;
_________________________
I came, I saw, I fell asleep  )
|
|
Top
|
|
|
|
#108041 - 2003-11-19 02:10 PM
Re: Email adress
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Scooter,
You should not need to do this..
Quote:
$rc = WriteValue("HKCU\Software\Microsoft\Office\Outlook\OMI Account Manager\Accounts\00000001", "Account Name", "@DOMAIN", "REG_SZ")
Instead, try this..
Code:
$rc = WriteValue("HKCU\Software\Microsoft\Office\Outlook\OMI Account Manager\Accounts\00000001", "Account Name", @DOMAIN, "REG_SZ")
Please note: with Variables, Macros, and Numbers you should not need to surround with quotes.
Another comment..
In your code, you re-use the REG Key -
"HKCU\Software\Microsoft\Office\Outlook\OMI Account Manager\Accounts\00000001"
So.. Give it a Variable and clean up your code some more.. Code:
$maildomain = "@@thedomain.com" $pop = "mail" $smtp = "mailout" $OMI="HKCU\Software\Microsoft\Office\Outlook\OMI Account Manager\Accounts\00000001" $rc = AddKey($OMI) $rc = WriteValue($OMI, "Account Name", @DOMAIN, "REG_SZ") $rc = WriteValue($OMI, "Connection Type", 0, "REG_DWORD") $rc = WriteValue($OMI, "POP3 Prompt for Password", 0, "REG_DWORD") $rc = WriteValue($OMI, "POP3 Server", $POP, "REG_SZ") $rc = WriteValue($OMI, "POP3 Use Sicily", 0, "REG_DWORD") $rc = WriteValue($OMI, "POP3 User Name", @USERID, "REG_SZ") $rc = WriteValue($OMI, "SMTP Display Name", @FULLNAME, "REG_SZ") $rc = WriteValue($OMI, "SMTP Email Address", @USERID + $maildomain, "REG_SZ") $rc = WriteValue($OMI, "SMTP Server", $SMTP, "REG_SZ") ; ; Set the email sending and retrieval options - Office2k ; $OPTIONS="HKCU\Software\Microsoft\Office\9.0\Outlook\Options\Mail" $rc = WriteValue($OPTIONS, "Always hide dialog", 1, "REG_DWORD") $rc = WriteValue($OPTIONS, "Poll For Mail", 1, "REG_DWORD") $rc = WriteValue($OPTIONS, "Poll For Mail Interval", 5, "REG_DWORD") $rc = WriteValue($OPTIONS, "Send Mail Immediately", 1, "REG_DWORD")
HTH,
Kent
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Allen)
and 1607 anonymous users online.
|
|
|