Hi,
I am opening an OFT file as follows:
mailMessageDocument = MailMessage.Load(mailStream)
where ‘mailStream’ is a MemoryStream containing the OFT file.
I then try to save the OFT file after making changes by creating a MapiMessage as follows:
var message = MapiMessage.FromMailMessage(_mailMessageDocument);
message.SetMessageFlags(MapiMessageFlags.MSGFLAG_UNSENT);
using (var outputStream = new MemoryStream())
{
message.SaveAsTemplate(outputStream);
}
When writing the resulting outputStream to disk, the resulting OFT file opens, but any embedded images in the original are lost.
If I save the same OFT as MSG using outlook, and use MapiMessage.Save to save the MSG file, the embedded images are retained.
How can I preserve the images when saving as OFT?
I am using Aspose.Email version 18.3
Many thanks
Hamish
OFTContent.zip (294.0 KB)