Obtaining "Internet Headers" programatically in C++

D

Doug Coates

Sorry if this has been asked before.

How can I obtain the "Internet Headers" programatically using C++?

(The ones that are displayed when you right click on a mail message and
select options)

I currently grab the body of the mail message via Application ->
NameSpace(MAPI) -> MAPIFolder(olFolderInbox) -> Items -> _MailItem.GetBody()

I examine the body of any new mail message and check for any hyperlink
(http://..../) that points to a spam site and delete the mail message. I
would like to examine the from IP addresses in the internet headers and
delete the mail if the IP address is from a blacklisted site.

Doug
 
D

DQ

CDO exposes internet headers as fields collection of the item you can
retrieve these headers by retrieving the field
PR_TRANSPORT_MESSAGE_HEADERS
 

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