WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

How to get mail header

 
   Home -> Office -> Program Add-Ins RSS
Next:  Comparing, counting, if, sum... help...  
Author Message
Ashish

External


Since: May 27, 2009
Posts: 6



(Msg. 1) Posted: Wed Jul 22, 2009 5:05 am
Post subject: How to get mail header
Archived from groups: microsoft>public>outlook>program_addins (more info?)

PR_TRANSPORT_MESSAGE_HEADERS contains mail header. For those mails which
dont have PR_TRANSPORT_MESSAGE_HEADERS property how to get their headers?
Back to top
Login to vote
Ken Slovak - [MVP - Outlo

External


Since: Oct 17, 2003
Posts: 2977



(Msg. 2) Posted: Wed Jul 22, 2009 10:01 am
Post subject: Re: How to get mail header [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

They won't have headers if they don't have PR_TRANSPORT_MESSAGE_HEADERS.

Only emails sent over the Internet have that property. If the email was sent
internally using Exchange the property and mail headers won't exist on that
item.

--
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" <akohli_2004.DeleteThis@hotmail.com> wrote in message
news:OATAgdqCKHA.1252@TK2MSFTNGP04.phx.gbl...
> PR_TRANSPORT_MESSAGE_HEADERS contains mail header. For those mails which
> dont have PR_TRANSPORT_MESSAGE_HEADERS property how to get their headers?
>
Back to top
Login to vote
Ashish

External


Since: May 27, 2009
Posts: 6



(Msg. 3) Posted: Wed Jul 22, 2009 12:05 pm
Post subject: Re: How to get mail header [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

If i login to any exchange user account, and send a web page to exchange
user ( open internetexplorer for google.com web page and select
File->Send->Page By Email...).
This mail will not contain PR_TRANSPORT_MESSAGE_HEADERS.
Is there any other property for this mail which allow me to read mail
contents.
"Ken Slovak - [MVP - Outlook]" <kenslovak.RemoveThis@mvps.org> wrote in message
news:uCZJaXtCKHA.3708@TK2MSFTNGP02.phx.gbl...
> They won't have headers if they don't have PR_TRANSPORT_MESSAGE_HEADERS.
>
> Only emails sent over the Internet have that property. If the email was
> sent internally using Exchange the property and mail headers won't exist
> on that item.
>
> --
> 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" <akohli_2004.RemoveThis@hotmail.com> wrote in message
> news:OATAgdqCKHA.1252@TK2MSFTNGP04.phx.gbl...
>> PR_TRANSPORT_MESSAGE_HEADERS contains mail header. For those mails which
>> dont have PR_TRANSPORT_MESSAGE_HEADERS property how to get their headers?
>>
>
Back to top
Login to vote
Ken Slovak - [MVP - Outlo

External


Since: Oct 17, 2003
Posts: 2977



(Msg. 4) Posted: Wed Jul 22, 2009 1:15 pm
Post subject: Re: How to get mail header [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

What do you mean read mail contents?

If you get the item as a MailItem you can read every property it has. What
properties do you want to get? If the item was sent by you it should be in
Sent Items. You obviously can't read the message that was received by the
recipient, it's in his mailbox (unless you have permissions to access his
mailbox).

It still won't have Internet headers since it never was sent over the
Internet if it was strictly an internal email.

--
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" <akohli_2004.RemoveThis@hotmail.com> wrote in message
news:%23Wsxk$tCKHA.1492@TK2MSFTNGP03.phx.gbl...
> If i login to any exchange user account, and send a web page to exchange
> user ( open internetexplorer for google.com web page and select
> File->Send->Page By Email...).
> This mail will not contain PR_TRANSPORT_MESSAGE_HEADERS.
> Is there any other property for this mail which allow me to read mail
> contents.
Back to top
Login to vote
Ashish

External


Since: May 27, 2009
Posts: 6



(Msg. 5) Posted: Thu Jul 23, 2009 7:05 am
Post subject: Re: How to get mail header [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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"

"Ken Slovak - [MVP - Outlook]" <kenslovak.TakeThisOut@mvps.org> wrote in message
news:%23vSZ7BvCKHA.4432@TK2MSFTNGP05.phx.gbl...
> What do you mean read mail contents?
>
> If you get the item as a MailItem you can read every property it has. What
> properties do you want to get? If the item was sent by you it should be in
> Sent Items. You obviously can't read the message that was received by the
> recipient, it's in his mailbox (unless you have permissions to access his
> mailbox).
>
> It still won't have Internet headers since it never was sent over the
> Internet if it was strictly an internal email.
>
> --
> 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" <akohli_2004.TakeThisOut@hotmail.com> wrote in message
> news:%23Wsxk$tCKHA.1492@TK2MSFTNGP03.phx.gbl...
>> If i login to any exchange user account, and send a web page to exchange
>> user ( open internetexplorer for google.com web page and select
>> File->Send->Page By Email...).
>> This mail will not contain PR_TRANSPORT_MESSAGE_HEADERS.
>> Is there any other property for this mail which allow me to read mail
>> contents.
>
Back to top
Login to vote
Ken Slovak - [MVP - Outlo

External


Since: Oct 17, 2003
Posts: 2977



(Msg. 6) Posted: Thu Jul 23, 2009 9:26 am
Post subject: Re: How to get mail header [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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" <akohli_2004 DeleteThis @hotmail.com> wrote in message
news:%23dQwmH4CKHA.4168@TK2MSFTNGP05.phx.gbl...
> 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"
Back to top
Login to vote
Ashish

External


Since: May 27, 2009
Posts: 6



(Msg. 7) Posted: Thu Jul 23, 2009 11:05 am
Post subject: Re: How to get mail header [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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]" <kenslovak.DeleteThis@mvps.org> wrote in message
news:OXLLcr5CKHA.3800@TK2MSFTNGP04.phx.gbl...
> 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" <akohli_2004.DeleteThis@hotmail.com> wrote in message
> news:%23dQwmH4CKHA.4168@TK2MSFTNGP05.phx.gbl...
>> 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"
>
Back to top
Login to vote
Ken Slovak - [MVP - Outlo

External


Since: Oct 17, 2003
Posts: 2977



(Msg. 8) Posted: Thu Jul 23, 2009 1:26 pm
Post subject: Re: How to get mail header [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I have no idea what that Web page is sending out. If it meets the normal
RFC's for Internet email then it should be providing message headers and
those should be in the PR_TRANSPORT_MESSAGE_HEADERS property.

If the MAPI property is there (x-header MAPI property) instead of the
correct PR_TRANSPORT_MESSAGE_HEADERS property then I can only assume the Web
page is using Exchange and not sending over the Internet.

If it was truly Internet email sent out by the Web page then the MAPI
property would mean nothing to it. That sort of MAPI property is translated
into an x-header by MAPI when the email goes out through the message
transport. And the MAPI property can only be added using MAPI or an
equivalent API. The property means nothing to something like SMTP mail, or
SQL Server mail or whatever. Certainly a MAPI extended property wouldn't be
preserved except by MAPI.

--
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" <akohli_2004.TakeThisOut@hotmail.com> wrote in message
news:%23w$lVB6CKHA.2832@TK2MSFTNGP03.phx.gbl...
> 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
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> Program Add-Ins All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
  Office
 Office Other
 Security
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET |
  • IT Support