Group:  Microsoft Outlook ยป microsoft.public.outlook.program_addins
Thread: How do I get a mail item's MessageID

Geek News

How do I get a mail item's MessageID
Bickers 2/5/2007 9:42:00 PM
Hi,

I need to track messages in a database, but be able to handle the same
message being sent to multiple recipients (within an Exchange environment).

I know that all messages sent to multiple recipients will have the same
MessageID value, but I can find no information as to how to retrieve it.

What I'm planning is that when a message is opened, an AddIn will check
whether the message has already been handled and if not, store info in a
database (simplistic view). When another user reads the same message, I need
to be able to detect that it's already been handled.

Thanks for any help,

Phil.
Re: How do I get a mail item's MessageID
"Ken Slovak - [MVP - Outlook]" <kenslovak[ at ]mvps.org> 2/6/2007 2:42:07 PM
I think what you want is the EntryID of the item, which is accessible from
the Outlook object model or from other API's like CDO 1.21 or Extended MAPI.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Bickers" <Bickers[ at ]discussions.microsoft.com> wrote in message
news:129A5A1E-8127-412A-8F14-F012A29EC990[ at ]microsoft.com...
[Quoted Text]
> Hi,
>
> I need to track messages in a database, but be able to handle the same
> message being sent to multiple recipients (within an Exchange
> environment).
>
> I know that all messages sent to multiple recipients will have the same
> MessageID value, but I can find no information as to how to retrieve it.
>
> What I'm planning is that when a message is opened, an AddIn will check
> whether the message has already been handled and if not, store info in a
> database (simplistic view). When another user reads the same message, I
> need
> to be able to detect that it's already been handled.
>
> Thanks for any help,
>
> Phil.

Re: How do I get a mail item's MessageID
"Dmitry Streblechenko" <dmitry[ at ]dimastr.com> 2/6/2007 5:40:58 PM
If you mean the MIME message id header, it is not guaranteed to be present.
If it is available, it will be in the PR_INTERNET_MESSAGE_ID property
(0x1035001E), accessible using Extended MAPI (C++/Delphi only), CDO 1.21,
Redemption or MailItem.PropertyAccessor in Outlook 2007

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

"Bickers" <Bickers[ at ]discussions.microsoft.com> wrote in message
news:129A5A1E-8127-412A-8F14-F012A29EC990[ at ]microsoft.com...
[Quoted Text]
> Hi,
>
> I need to track messages in a database, but be able to handle the same
> message being sent to multiple recipients (within an Exchange
> environment).
>
> I know that all messages sent to multiple recipients will have the same
> MessageID value, but I can find no information as to how to retrieve it.
>
> What I'm planning is that when a message is opened, an AddIn will check
> whether the message has already been handled and if not, store info in a
> database (simplistic view). When another user reads the same message, I
> need
> to be able to detect that it's already been handled.
>
> Thanks for any help,
>
> Phil.


Re: How do I get a mail item's MessageID
Bickers 2/6/2007 8:15:02 PM
Hi Ken,

I was under the impression the EntryID can change. I need the ID that was
assigned to the message when it was sent.

There is a MessageID in the internet headers, but will that be present in a
message sent via Exchange ?

Cheers,

Phil.

"Ken Slovak - [MVP - Outlook]" wrote:

[Quoted Text]
> I think what you want is the EntryID of the item, which is accessible from
> the Outlook object model or from other API's like CDO 1.21 or Extended MAPI.
>
> --
> Ken Slovak
> [MVP - Outlook]
> http://www.slovaktech.com
> Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
> Reminder Manager, Extended Reminders, Attachment Options
> http://www.slovaktech.com/products.htm
>
>
> "Bickers" <Bickers[ at ]discussions.microsoft.com> wrote in message
> news:129A5A1E-8127-412A-8F14-F012A29EC990[ at ]microsoft.com...
> > Hi,
> >
> > I need to track messages in a database, but be able to handle the same
> > message being sent to multiple recipients (within an Exchange
> > environment).
> >
> > I know that all messages sent to multiple recipients will have the same
> > MessageID value, but I can find no information as to how to retrieve it.
> >
> > What I'm planning is that when a message is opened, an AddIn will check
> > whether the message has already been handled and if not, store info in a
> > database (simplistic view). When another user reads the same message, I
> > need
> > to be able to detect that it's already been handled.
> >
> > Thanks for any help,
> >
> > Phil.
>
>
Re: How do I get a mail item's MessageID
Bickers 2/6/2007 8:17:01 PM
Thanks Dmitry.

Is that the MessageID visible in the headers of a message ?

What about a message sent via Exchange (ie within an organisation, without
going out to the internet) ? Does Exchange assign an ID to sent messages ?

Cheers,

Phil.

"Dmitry Streblechenko" wrote:

[Quoted Text]
> If you mean the MIME message id header, it is not guaranteed to be present.
> If it is available, it will be in the PR_INTERNET_MESSAGE_ID property
> (0x1035001E), accessible using Extended MAPI (C++/Delphi only), CDO 1.21,
> Redemption or MailItem.PropertyAccessor in Outlook 2007
>
> Dmitry Streblechenko (MVP)
> http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
>
> "Bickers" <Bickers[ at ]discussions.microsoft.com> wrote in message
> news:129A5A1E-8127-412A-8F14-F012A29EC990[ at ]microsoft.com...
> > Hi,
> >
> > I need to track messages in a database, but be able to handle the same
> > message being sent to multiple recipients (within an Exchange
> > environment).
> >
> > I know that all messages sent to multiple recipients will have the same
> > MessageID value, but I can find no information as to how to retrieve it.
> >
> > What I'm planning is that when a message is opened, an AddIn will check
> > whether the message has already been handled and if not, store info in a
> > database (simplistic view). When another user reads the same message, I
> > need
> > to be able to detect that it's already been handled.
> >
> > Thanks for any help,
> >
> > Phil.
>
>
>
Re: How do I get a mail item's MessageID
"Ken Slovak - [MVP - Outlook]" <kenslovak[ at ]mvps.org> 2/6/2007 8:47:59 PM
EntryID can change if an item is moved, it depends on the store provider.
Internet Message ID's in the headers aren't there in intra-organizational
Exchange emails, only on emails sent via the Internet.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Bickers" <Bickers[ at ]discussions.microsoft.com> wrote in message
news:8EB14C23-37A5-46E1-ADF7-A2C86206B116[ at ]microsoft.com...
[Quoted Text]
> Hi Ken,
>
> I was under the impression the EntryID can change. I need the ID that was
> assigned to the message when it was sent.
>
> There is a MessageID in the internet headers, but will that be present in
> a
> message sent via Exchange ?
>
> Cheers,
>
> Phil.

Re: How do I get a mail item's MessageID
"Dmitry Streblechenko" <dmitry[ at ]dimastr.com> 2/6/2007 9:01:22 PM
AFAIK as of Exchange 2000 (or was it 2003?), the id will be set on the
messags sent by an EX server.

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

"Bickers" <Bickers[ at ]discussions.microsoft.com> wrote in message
news:A2BB5016-2FA5-45BB-8210-F46FC3569787[ at ]microsoft.com...
[Quoted Text]
> Thanks Dmitry.
>
> Is that the MessageID visible in the headers of a message ?
>
> What about a message sent via Exchange (ie within an organisation, without
> going out to the internet) ? Does Exchange assign an ID to sent messages ?
>
> Cheers,
>
> Phil.
>
> "Dmitry Streblechenko" wrote:
>
>> If you mean the MIME message id header, it is not guaranteed to be
>> present.
>> If it is available, it will be in the PR_INTERNET_MESSAGE_ID property
>> (0x1035001E), accessible using Extended MAPI (C++/Delphi only), CDO 1.21,
>> Redemption or MailItem.PropertyAccessor in Outlook 2007
>>
>> Dmitry Streblechenko (MVP)
>> http://www.dimastr.com/
>> OutlookSpy - Outlook, CDO
>> and MAPI Developer Tool
>>
>> "Bickers" <Bickers[ at ]discussions.microsoft.com> wrote in message
>> news:129A5A1E-8127-412A-8F14-F012A29EC990[ at ]microsoft.com...
>> > Hi,
>> >
>> > I need to track messages in a database, but be able to handle the same
>> > message being sent to multiple recipients (within an Exchange
>> > environment).
>> >
>> > I know that all messages sent to multiple recipients will have the same
>> > MessageID value, but I can find no information as to how to retrieve
>> > it.
>> >
>> > What I'm planning is that when a message is opened, an AddIn will check
>> > whether the message has already been handled and if not, store info in
>> > a
>> > database (simplistic view). When another user reads the same message, I
>> > need
>> > to be able to detect that it's already been handled.
>> >
>> > Thanks for any help,
>> >
>> > Phil.
>>
>>
>>


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net