View Single Post
  #7  
Old July 23rd 09, 03:14 PM posted to microsoft.public.outlook.program_addins
Ashish
external usenet poster
 
Posts: 94
Default How to get mail header

Yes you are right if we add headedr then we can read as MAPI property on
exchange server.
Thanks for clear understanding.
In outlook addin we can read mail header using PR_TRANSPORT_MESSAGE_HEADER

For all mails we can read header using PR_TRANSPORT_MESSAGE_HEADER in
outlook addin. and using MAPI property on exchange server.
But below case(send mail using webpage) MAPI property on exchange server
can read header, but outlook addin fail to read header. It shows empty
header.

Is there any reason why it's happening






"Ken Slovak - [MVP - Outlook]" wrote in message
...
If you send an email entirely within Exchange and it never leaves the
server there will not be any PR_TRANSPORT_MESSAGE_HEADER in the email
Exchange does not add those headers for internal emails.

If you send an email over the Internet the received email will have the
PR_TRANSPORT_MESSAGE_HEADER property. The sent item in the Sent Items
folder will never have that property, so I have no idea what you're
talking about. Check it yourself with a MAPI viewer such as OutlookSpy.
There are no headers in the sent item, period.

In a case where there is no property like that obviously there are no
headers, so how can you read the headers? It's impossible.

If you are adding headers to outgoing items using the special named MAPI
property trick then in internal only emails that stay within Exchange
there still won't be any PR_TRANSPORT_MESSAGE_HEADER property on the item
but the MAPI property you added will be there and can be read as a MAPI
property.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Ashish" wrote in message
...
If i login to exchange user, create a new mail and send to same user then
mail comes in its Inbox and SentItems folder. And both mails have
PR_TRANSPORT_MESSAGE_HEADERS property. I need mail header b'se i write my
own data in mail header(urn:schemas:mailheader:mytag)
In outlook addin i need to get mail header b'se i want to get mytag which
i wrote in mail.

For below specific case when send a mail using web page, mail dont
contain PR_TRANSPORT_MESSAGE_HEADERS. So my question is
"Is there any possiblity to get mail header in outlook addin if above
property is not present"




Ads