WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

ADSI
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Extract SMTP address in Exch 5 5


Question:

Running Exchange 5.5 in NT 4.0 domain - need to extract user(s) primary smtp address via WinBatch script (there may be multiple addresses per user) for use with 'smtpSendText' command. Any/all help appreciated...

Answer:

This is not tested but the snippet below may get you started. It uses the ADSI extender's "dsGetProperty" path.
sMailBoxPath = "LDAP://Myserver/cn=myusersam,cn=Recipients,OU=mysite,O=myorg" 
sSmtpAddr = dsGetProperty(sMailBoxPath,"rfc822Mailbox")
Not sure but I think the "mail" property may work, as well. Not to sure about the path either but obviously you need to change the myxxx's to information applicable to your system.
Article ID:   W15810
File Created: 2004:03:30:15:40:58
Last Updated: 2004:03:30:15:40:58