I am trying to get Exchange 2010 to change the MessageClass (PR_MESSAGE_CLASS) of an incoming message to a message of my custom form (IPM.Note.MyCustom) when the incoming message has a specific set of headers. ( X-MyCustomHeader: Yes )
I saw some information about setting a different MIME header ( Content-Class: , which Exchange will use to set MessageClass, but it does not seem to work for me. (I saw examples that use Content-Class: MyCustom and Content-Class: urn:content-class:custom.MyCustom )
I even looked into the transport agent letter in C #, and I found the MapiMessageClass property in the EmailMessage class, but it is read-only. I also looked at the added MAPI property in the TNEF section, but the Exchange API does not offer a way to create a TNEF section if it does not already exist. (And most mail from the Internet does not work.)
There must be a way to do this. What am I missing?
source share