I'm trying to start up a thread of mails defined by the same ID (ID needs to be a specific value equal to the one in our database). I can assign a custom internet header just fine like this:
sendMail.PropertyAccessor.SetProperty("http://schemas.microsoft.com/mapi/string/{00020386-0000-0000-C000-000000000046}/DCPID", taskId);
Where the sendMail is an olMailItem
and taskId
is the id needed.
When this mail is sent and recieved I can get my ID with the GetProperty
method but when forwarded or replied the internet header gets removed and I can't access this property anymore.
Is there a way to keep your custom internet header from being removed, no matter where it goes?
No, there is no way to preserve a custom message header on reply or forward.
来源:https://stackoverflow.com/questions/15197356/keep-outlook-mailitem-property-internet-header-from-being-removed-when-forward