RFC822 Headers in MailItem

Zauberkind
2StarLounger
Posts: 141
Joined: 21 Oct 2011, 10:08

RFC822 Headers in MailItem

Post by Zauberkind »

Greetings,

I want to work my way through a bunch of MailItems, and extract some information from the RFC822 headers.

I can get the relevant MailItem objects with no problem, but I can't figure out how to access the headers.

Any brilliant ideas (or sad experiences) out there?

TIA

Regards,
Zk

User avatar
HansV
Administrator
Posts: 78468
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: RFC822 Headers in MailItem

Post by HansV »

The mail header isn't exposed in Outlook VBA. You'll need to use CDO or Extended MAPI to read the mail header. See for example
Capture the Internet headers from the current message
How to access SMTP headers of a message using CDO (1.x)
Best wishes,
Hans

Zauberkind
2StarLounger
Posts: 141
Joined: 21 Oct 2011, 10:08

Re: RFC822 Headers in MailItem

Post by Zauberkind »

Thanks Hans,

got it in one!

Regards,
Zk