开发者

Extended MAPI: How to get the entry ID of messages moved by CopyMessages

开发者 https://www.devze.com 2022-12-29 05:51 出处:网络
I have found that if I move a message using IMAPIFolder::CopyMessages (using the MESSAGE_MOVE flag) the message gets a new entry ID. However I do not see any reliable way of getting the entry ID of th

I have found that if I move a message using IMAPIFolder::CopyMessages (using the MESSAGE_MOVE flag) the message gets a new entry ID. However I do not see any reliable way of getting the entry ID of the message in its new location, or otherwise getting a reference to it.

The best suggestion I have had so far involves tagging the message with the old custom property before moving, and then doing a search afterwards, but I was wonderin开发者_JAVA技巧g if there is a less convoluted solution.


The PR_SEARCH_KEY property should remain the same after the move. You would still have to search for the message after the move but it does eliminate the custom property just for tagging the messages.

Another possibility would be to setup notifications using IMAPIAdviseSink on the destination folder before you move the messages. I haven't done this personally, and it might be more work than it's worth.

0

精彩评论

暂无评论...
验证码 换一张
取 消