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

Free Support Forum - aspose.com

Extract message from attachment

Hi,

Is there a way to extract Message from Object data of an attachment?

Hi Acton,

Thank you for contacting Aspose Support team.

You can use the following code sample to extract message from object data of an attachment. Please try it at your end and let us know your feedback.

Sample Code:


var mapi = MapiMessage.FromFile(fileName);
if (mapi.Attachments[0].ObjectData.IsOutlookMessage)
{
var emb = mapi.Attachments[0].ObjectData.ToMapiMessage();
}