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

Free Support Forum - aspose.com

Getting Exception while adding mails to PST

When i try to add mails in pst file, I get the following exception. Can you please explain why this exception is coming?

at System.Buffer.BlockCopy(Array src, Int32 srcOffset, Array dst, Int32 dstOffset, Int32 count)
at •.–.Š()
at •.–.Š()
at •.Š.Š()
at Aspose.Email.Outlook.MapiMessage.get_Headers()
at Aspose.Email.Outlook.MapiMessage.Save(Stream stream)
at Aspose.Email.Outlook.MapiMessage.Clone()
at ’.œ.Š(MapiMessage , FolderInfo , ŠŠ , Boolean )
at ’..AddMessage(FolderInfo , MapiMessage , a˜ , ŠŠ , Boolean )
at ’..AddMessage(FolderInfo , MapiMessage )
at Aspose.Email.Outlook.Pst.FolderInfo.AddMessage(MapiMessage message)
at PSTWriter.ASPOSEWriter.saveSysEmailToPST(Mail p_sysEmail, String p_tmpEmlPath, String p_folderPath, String p_pstFileName, String& p_NewPstFileName, FolderType p_FolderType)

value cannot be null. Parameter name: src

Hi Pooja,

Could you please provide us with the sample message files that give rise to such exception? We’ll investigate the issue by reproducing it further and assist you accordingly.

Please find the attached file for which i was getting the above exception.

Hi Pooja,

Thank you for sharing the sample EML file.

I have tried to reproduce this issue at my end using the latest version of Aspose.Email for .NET 4.0.0 and was not able to face any such exception as you have mentioned. Please give it a try using this latest version and let us know your feedback.

I tried using latest version of Aspose.Email for .NET 4.0.0 and it solved my problem. Thanks a lot.

Hi Pooja,

We are glad to know that your issue is resolved and please feel free to write us back if you have any other query related to Aspose.Email.