Free Support Forum - aspose.com

Error "This is not a structured storage file" when load .msg file

I want to reading content of .msg file and this is my code:
Dim msg As MapiMessage = MapiMessage.FromFile(“D:\Test\md50000003583.msg”)

but it show error “This is not a structured storage file”

plz help me, thanks so much
this is my msg file => md50000003583.zip (1.0 MB)

@gunrose,

Thank you for writing to Aspose support team.

I have tried to open this sample MSG file in Outlook 2013 and a third party application MFCMapi. It seems that this MSG is corrupted and cannot be opened using outlook, hence it is not an issue with Aspose.Email library. Please give it a try using Outlook and share the feedback.

Thanks @kashif.iqbal for your reply. I’m using Mdaemon for email server and now I need import content of email in public folder (public folder was created by Mdaemon) to database. All emails are .msg file same as file that I have uploaded.
And all file have same error :frowning:

@gunrose,

It seems the problem is with the message type you are exporting. If you rename this file to EML, you will be able to open it in Outlook as well as using our API. Please try it at your end and let us know your feedback.

I have changed file to .EML but still error while I can open it with Outlook :frowning: I can not understand :frowning:

@gunrose,

EML files have to be loaded using MailMessage instead of MapiMessage. Please use the following code to load the EML file.

MailMessage eml = MailMessage.Load("174664\\md50000003583.eml");

1 Like

Thanks for your support! it was successful :kissing_heart:

@gunrose,

You are welcome.