I'm exporting emails by Exchange 2016 transport agent and saving them to disk. Outlook successfully opens all the emails, resolve headers, but ts is not able to show body of messages sent from Outlook client. Type is:
Content-Type: application/ms-tnef; name="winmail.dat"
Other types (MIME etc.) are OK. Exported messages do contain body. I'm able to convert it to .msg and all works after this operation. Why is this happening?
Email export method:
using (var stream = new MemoryStream())
{
email.MimeDocument.WriteTo(stream);
storageManager.SaveStreamToFile(stream, path);
size = stream.Length;
}
I've alredy tried using various events of transport pipeline (https://technet.microsoft.com/en-us/library/bb125012(v=exchg.150).aspx). This question was asked on different forums, but there is no real answer. I'll provide an example of email if you want me to.