Email Address and Exchange

J

Jim

I am trying to retrieve the email address of a user using
Outlook.MailItem, but if the user is using Exchange the email address
comes back with a whole bunch of extra information that I do not need,
any ideas on how to get just the email address if the user is using MS
Exchange? I am using C#, but it doesn't matter
Thanks,
Rog
 
K

Ken Slovak - [MVP - Outlook]

To get from the Exchange distinguished name to an SMTP address you would
need to use a MAPI property that isn't exposed in the Outlook object model.
You would have to use C++ or Delphi with Extended MAPI, or CDO 1.21 (not
supported with C#) or Redemption (www.dimastr.com/redemption) code.

You can also hack the returned EX DN, look for the last "/cn" in the address
and that gives you the part before the domain. If you know the user's domain
you would add that plus the "@" character.

See http://www.outlookcode.com/threads.aspx?forumid=2&messageid=6974 for
more information.
 

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