Obtaining "Internet Headers" programatically in C++

  • Thread starter Thread starter Doug Coates
  • Start date Start date
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
 
CDO exposes internet headers as fields collection of the item you can
retrieve these headers by retrieving the field
PR_TRANSPORT_MESSAGE_HEADERS
 
Back
Top