How do you extract a recipient's smtp address from an email?

I want to be able to programatically, (e.g. in VBA), extract the "To" recipient's smtp email address that the sender has used, (fred.bloggs@mycompany.com), contained in emails that I have been cc'ed into.
My research online and looking through the object model of the Outlook.mail.recipients collection so far shows me I can obtain the exchange display name "Bloggs, Fred" or the exchange account id, or even the primary smtp address for the account.
However, for my project I need the actual smtp address used by the sender that is hidden within the email received, (I won't bore your with the reason I need it).
(To test that the smtp address used by the sender is indeed held within an Outlook email, I have sent myself two emails, one to each of my two smtp email addresses. If I copy my emails to an Explorer folder and open each email in notepad I can see the different smtp addresses ).
(I am using both Outlook 2003 and Outlook 2010).


June 18th, 2015 12:22pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics