I want to access the raw mail source of Outlook email. (Same as if you right click on any email and then click on "view source"). I have the header part using Mapi headers but not the whole body.
Some links have suggested that using "https://schemas.microsoft.com/mapi/proptag/0x1000001E" and 0X0000001F can give access to the body, but it gives me exception of unauthorized access.
Some links are say that MAPI properties do not support it as they don't know how big the body would be. However it is very old post.
I have my VSTO addin (in C#) and I am using MailItem object.
Is there any way to access the raw source of whole mail or have I only extended mapi interfaces in C++ to solve this?
Outlook does not normally store the original MIME source of a message. Its is simply not its native format. The best you can do is read the MIME headers from the PR_TRANSPORT_MESSAGE_HEADERS property (DASL name http://schemas.microsoft.com/mapi/proptag/0x007D001F
).
Take a look at the messages with OutlookSpy (click the IMessage button) to see the available properties.
User contributions licensed under CC BY-SA 3.0