Question

I created an add-in for MS Outlook which simply shows some email headers info. The command for showing header info is accessible from a selected email item's context menu. Everything is good until I setup a delivery rule for sending emails. Every email is staying in outbox folder for a 2 minutes and getting sent after that. But when I'm selecting a email item it getting regular font (untouched is bold and italic) and losing it sent datetime field value and showing as "none". After that the email is staying in outbox folder without sending.

enter image description here

I found a code part which causing a such behavior

string header = (string)mailItem
                 .PropertyAccessor
                 .GetProperty("http://schemas.microsoft.com/mapi/proptag/0x007D001E");

So I'm seeing that a simple GetProperty operation breaks the outbox email item state. I was unable to find any info related to the above mentioned behavior and didn't know how to fix this. So my question is how to fix this issue and why such a behavior is happening ?

Was it helpful?

Solution

Touching a message marked for submission with OOM or the Outlook Object Model aborts the submission process.

Can you exclude messages in the Outbox folder?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top