How to Save Attachment from .Msg file

Hi All,

I have .msg file and I want to save attachment from the .msg file to my machine.

Could you please provide me some example code.

Many Thanks


Hi John,

Thanks for writing to Aspose.Email support team.

Aspose.Email provides rich features to process Mapi messages. You may please use MapiAttachment to extract attachments from the collection of attachments in the message. Please give a try to the following code which saves all the attachments on disc and let us know your feedback.

MapiMessage mapi = MapiMessage.FromFile(@“Attachments.msg”);
foreach (MapiAttachment attch in mapi.Attachments)