Active directory path instead of smtp email

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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.
 
Back
Top