|PstMessageGetAsMailMessage Method (Boolean)|
public MailMessage GetAsMailMessage( bool includeHeaders )
Public Function GetAsMailMessage ( includeHeaders As Boolean ) As MailMessage
"X-Msg" headers are PstFields values converted into strings and added to the message as "X-Msg-" + PstFieldName headers. You can access PstFields separately and specify includeHeaders as false if you do not want to add these values as the message headers (useful if you want to keep the message in its original form).
Using PstFields instead of accessing "X-Msg" headers has another benefit. "X-Msg" headers are already converted to strings while PstFields values keep their original data types. The only reason to have "X-Msg" headers in the message is if you want to transfer the message to another system or save it into a file/stream/.XML and process the message later.