We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Converting MSG to MailMessage

Hi,

Is there a neat way to convert MSG to MailMessage? I currently save it to memory stream and then load it in MailMessage.

Hi Acton,


Thank you for your inquiry.

Please try following code to get MailMessage from a MapiMessage.

MapiMessage mapiMsg = MapiMessage.FromFile(“test.msg”);
// get MailMessageInterpretor instance
MailMessageInterpretor mi = MailMessageInterpretorFactory.Instance.GetIntepretor(mapiMsg.MessageClass);

// get MailMessage instance
MailMessage message = mi.Interpret(mapiMsg);