Extract SMTP email address from Exchange user

T

Tarran

Hi All,

With C#; how can I Extract the SMTP email address from an Exchange recipient
without using redemption?

I'm looping through each recipient and want to extract the smtp address when
its and exchange address.
------
foreach (MSOutlook.Recipient objItem in mailItem.Recipients){
// check for smtp address
}
------

All help is appreciated,

Kind Regards,
Tarran
 
K

Ken Slovak - [MVP - Outlook]

You would need to be able to get at an unexposed property, so you can't do
it with just the OOM. You can in Outlook 2007, that has a property to get
the SMTP address.

A hack would be to get the Exchange DN and strip out the alias, which is
usually the last cn=. If you know the domain name you can append that to the
alias to construct an SMTP address.
 
T

Tarran

Hi Ken,

Thanks for your reply.

I'm already doing the hack you suggested - just was hoping there was a
better way to do it.

I guess the hack will do.

Thanks again.
Tarran
 

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