I need to know the correct method for being able to set the transport headers directly from the MapiMessage object.
As near as I can tell there are 4 different ways to set the transport headers. One is by using the collection, and three by setting the Mapi Property directly. I have found only one method of setting the Mapi Property directly that works. I would like to know why that is, and/or if I’m doing something wrong when calling the other methods.
I know setting mapi properties directly have worked in past versions and rely heavily on the “setStringPropertyValue” method which is why I’m confused as to why it now doesn’t seem to be working.
I have attached some sample code which should reproduce the issues I’m seeing.
Specifically I need to know
- which methods I can safely use to set Strings
- how should I set those string properties when I may have PT_UNICODE or PT_STRING8 tags
- if I use the header collection, am I guaranteed that the order I add the headers will be the order of the headers when serialized to a string