Is there a way to check if messages are the same by mailitem.entryid and flatspaceurl
We have a crm system in place that processes emails, it gets a fla开发者_JS百科tspaceurl from the exchange server like: /-FlatUrlSpace-/5a194b8c1256794581cb898e6b93c34f-112ca9b4/68fcbe48ba7a604086372757c4cea3de-44e6af
And then i have a program running a on computer that gets the new incoming emails from mailboxes( have yet to find a method to trigger when a new email comes in ...) and write them to a file.
The only id i can see (that remotely looks like a flatspaceurl) on a MailItem is entryID is there any reference between the entryID and the flatspaceurl ???
The FlatUrlSpace property should not be used in this case.
See http://msdn.microsoft.com/en-us/library/cc815908.aspx for more information on how to compare elements. The FlatUrlspace is built from the entry id of the folder and the entryid of the item. While the entry id should not change over time, you will have servere problems upgrading this to Exchange 2010 where WebDAV is gone.
You should stick to one of the properties mentioned in that link.
Regarding that trigger you need: In Exchange 2003, you can use WebDAV replication (WevDAV Replication sample) or Exchange StoreEvents (EventSink foundation library).
Exchange 2007 introduced Pull- and Push noftications. The former are very easy to use, the latter more difficult (See http://exchangenotification.codeplex.com/).
精彩评论