Out of memory exception occur while adding one mail to pst

Hi,

I am trying to create a pst using Aspose.Email.dll.
But I am getting out of memory exception.
The eml file contains one large attachment up to 20 Mb.
Still it should work not so big.
-------------------------------------------
Exception is as follows

at System.IO.MemoryStream.set_Capacity(Int32 value)
at System.IO.MemoryStream.EnsureCapacity(Int32 value)
at System.IO.MemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at ?.?.ReadByte()
at ?.?.??()
at ?.?.??(Byte[] )
at ?.?.?(Byte[] )
at ?.?.?(Byte[] )
at ?.?.?()
at Aspose.Email.Mail.MailMessage.?a(Stream , MesageLoadOptions )
at Aspose.Email.Mail.MailMessage.Load(Stream stream, MessageFormat format)
at Aspose.Email.Mail.MailMessage.Load(String fileName, MessageFormat format)

Thanks in advance


Hi Pooja,


Thank you for contacting Aspose support team.

I have tested the scenario using a sample EML having large attachment (20MB) and added it to a PST. I am afraid to share that no exception is raised and EML was added to PST successfully. For further analysis, could you please share your sample EML file along with the code used for this testing? It will help us to analyze the problem and provide solution as soon as possible.