Hi all
as I've mentioned before, i'n writing an application that processes outgoing SMS before sending. I've recently stumbled upon a weird scenario and I hope someone here can think of something... since by the time ITH created / modified / moved events occur the message is already sent, I've had to write an unmanaged adviseSink, in which i catch the move event into the outbox, copy it to the sent items folder, and delete it from the outbox before it gets sent out.
I then catch the ITH messagingItemCopied event in managed code, and presto! i now have time to read it's fields, delete it, process the message however i want and resend it programmatically slightly later. this way i keep most of the logic in managed code. now i noticed that if the message i capture was a new message, everything works fine, but if the message is a reply to an older message, while i do get the messagingItemCopied event, when i try to get the copied message by using ITH outlooksession.getItemByItemId(e.ItemId) i get null. as far as i understand, the sequence for a reply msg is the same as for the new one : create a new message in drafts, populate it with a recipient (in new msg this is simply empty), modify the text and upon send move to Outbox. any ideas why one gives me a valid message to work with and the other returns null?
I've been wrecking my brains over this for more than a day, so any ideas will be more than welcome
thanks in advance
Aviv