Message Id

  • Thread starter Thread starter Mikael Alhadeff
  • Start date Start date
M

Mikael Alhadeff

Hello,

I would like to retrieve for each mail a unique identifier,
like the SMTP Message Id.

The only id i have found is the EntryId (in the Outlook.Message
interface) but it changes every time the mail is moved across folders
:(

Does someone know how to get a really unique (and permanent)
identifier for the mail messages ??

Thanks,

Mikael
 
You can try to access PR_SEARCH_KEY Extended MAPI property, but it is only
possible when using Extended MAPI/CDO 1.21/Redemption, but not Outlook
Object Model.
Or you can add your own custom property to the message instead
(MailItem.UserProperties.Add).

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
It is not possible to access the smtp id displayed in message headers ??

Actually, I would like to retrieve this identifier...

Thanks,

Mikael
 
Yes, with Extended MAPI/CDO 1.21/Redemption, but not with Outlook Object
Model.
The property you need is PR_TRANSPORT_MESSAGE_HEADERS (all headers) or
PR_INTERNET_MESSAGE_ID (just the message id).
Note that these properties are only present if a message was received from
the internet (SMTP). Unsent messages or messages received within an Exchange
5.5 server will not have them.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Back
Top