tags:

views:

126

answers:

1

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 wondering if there is a less convoluted solution.

+1  A: 

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.

Joe Doyle