Free Support Forum - aspose.com

Extracted email from msg can't open in Outlook

We save the attachment.ObjectData to a msg file if attachement.ObjectData.IsOutlookMessage = = true.
But we can’t seem to open the extracted msg from Outlook.
Attached please find the msg and the msg extracted.

Can you look into that?

Hello,

We don't support msg file format write/create feature by now. But we support saving the embedded outlook message files to eml format.

Check it out

MapiMessage attMsg = MapiMessage.FromProperties(attachment.ObjectData.Properties);
MailMessageInterpretor mi = MailMessageInterpretorFactory.Instance.GetIntepretor(attMsg.MessageClass);
using(FileStream fs = new FileStream(@"c:\temp\attembedded.eml", FileMode.Create))
{
mi.Save(attMsg, fs, MessageForamt.Eml);
}

The feature about write/create msg file is still under development.

When will this solution be available? Unfortunately saving the msg to an eml file isn’t useful to us; we need the actual msg file.

Thanks,
Nathan