Email Address and Exchange

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