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

Free Support Forum - aspose.com

Aspose.Email.Outlook.MapiMessage throws OutOfMemoryException(s)

Hello Aspose.Email Support,


The attached PST always throws OutOfMemoryExceptions when reading one specific email. MapiMessage.Body, BodyHtml, BodyRtf, and BodyType all cause the OutOfMemoryException.

The email is the one where MessageInfo.EntryIdString is “AAAAAMFJ7jZkgyhLlxxHblbzjcBENiAA”. Its Subject is “Items not moved in 12210-00040”.

When I dump the contents of MapiPropertyCollection PR_BODY from Visual Studio, it appears that the message is short, but it has lots of extra junk at the end.

Please see attached screenshot.

Can you fix this bug please?

Thank you very much.

Hi,


Thank you for contacting Aspose support team.

I have opened the sample pst “Compact_14.pst” using Outlook 2013. It opens fine however if I try to open the only message in folder “Jan 06”, it hangs the Outlook. Could you please send us the PST which can be opened in Outlook and message can also be opened properly using Outlook? It will help us to re-produce the scenario and provide assistance as soon as possible.

Hello Kashif Iqbal,


The Compact_14.pst I uploaded is the only version I have.

I have never opened it in Outlook; I do not use Outlook.

My application opens it using your API Aspose.Email.Outlook.Pst.PersonalStorage.FromFile().

Thank you for your help.

Best regards

Hi,


I have analyzed the PST again and am afraid to share that it hangs while opening it in Outlook. Sometimes it opens in outlook but message cannot be opened and outlook hangs. It seems that this PST is corrupted and is not recommended for further analysis.

Could you please let us know how this PST is created? If you can provide us the source messages, we may create PST here and use for re-producing the issue.

We are sorry for any inconvenience caused to you.

I do not know how the PST was created; I received it from a client. So it is confidential.


A teammate dragged the MSG from Outlook. I zipped it and am attaching it to this email. I hope it helps you analyze and address the OutOfMemoryException.

Thank you very much.

Hi,


We have analyzed the file and found that Outlook is still not able to open the file. There seems to be some issue with this MSG file and, hence, Aspose.Email raises exception while reading it. Could you please confirm if you were able to open it using Microsoft Outlook? Your feedback will allow us to further investigate this issue at our end.

Dear Kashif Iqbal,


Is there any update from your Development Team regarding this issue?

On July 5 2014, I sent a reply to your last email, but it no longer appears in this thread.

In summary, I do not use Outlook and have not tried opening this MapiMessage in Outlook. I only use Aspose.Email to open it but it always throws OutOfMemoryException(s) on MapiMessage.BodyType, .Body, .BodyHtml, and .BodyRtf.

Actually I don’t even need .Body, .BodyHtml, or .BodyRtf, but I DO need MapiMessage.BodyType. Aspose.Email always throws OutOfMemoryException here.

Is there anything that can be done to address this exception? Thank you very much for your continued assistance.

Best regards

Hi,


Thank you for writing to Aspose support again.

I have thoroughly investigated the MSG file again using Outlook 2007/2013 and observed that both were hanged while opening this message. Similarly Aid4Mail software is used which uses this MSG file to create PST, however opening this MSG in PST also hangs the Outlook. Observing all this, it is confirmed that this MSG file is corrupted and am afraid that Aspose.Email cannot read this message from PST. As the MSG file is corrupted so without the correct MSG file we cannot provide assistance in this regard.

Please feel free to write us back if you have any other query related to Aspose.Email.

OK, thank you very much for trying again.


Best regards

Hi,


You are welcome and please feel free to write to us in case you have any additional query/inquiry related to Aspose.Email. We’ll be glad to assist you further.