Active directory path instead of smtp email

G

Guest

Hi
I'm having a problem with the Outlook Contact Object and Exchange 2000
I'm developing an add-in that creates a journal item starting fro
a contact. One of the contact properties I need to use i
the contact email address. If I try to access the "Email1Address" propert
for the contact that it is in the domain, I receive the Active directory Path for the user

f.i:
/o=MY ORGANIZATION/ou=MY_SITE/cn=Recipients/cn=myuse

instead o

(e-mail address removed)

Do I need to get the correct email address in Activ
Directory with LDAP or there's an easier way to do that?

thanks a lot
Laura
 
K

Ken Slovak - [MVP - Outlook]

To get the SMTP address instead of the Exchange distinguished name you need
to access the PrSMTPAddress property (&H39FE001E ), which isn't exposed to
the Outlook object model. You need to get the AddressEntry object that
corresponds to the contact item and then get the Fields collection of that
AddressEntry and use that property tag to get the SMTP address.

Some sample code for getting the SMTP address from an AddressEntry is at
http://www.dimastr.com/redemption/. Press the Utilities button at the top of
the page and scroll down to the "Default SMTP address of an Exchange user"
example.

You can use CDO 1.21, Redemption or Extended MAPI to do this but CDO would
throw the security prompts.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top