If I send the same email to two different mailboxes, I'd like to be able to tell if these are the same email.
The problem is that the itemId
is different for the two emails. And I can't figure a way to have a unique identifier from two identical emails.
From Office
object in JS, I only get the itemId
(that vary) via : Office.context.mailbox.item.itemId
: Documentation
So I've been trying to find something else from EWS Managed API via:
EmailMessage.Bind(service, mail.ItemId, new PropertySet(ItemSchema.Id));
But I can't find any useful property from ItemSchema
. (ItemSchema documentation)
How can I know that two emails are the same when they are in two different mailboxes ?
Is there a way to compare two ids ?
There is no 100% answer for this. They are actually two separate copies, so there is no actual link between them. You might be able to retrieve the RFC 822 message ID (try the InternetMessageHeaders
property) and compare that, but you'd be assuming that nothing modified that value before you retrieved it.