Creating PST has issue with BMP attachment

Hi guys,


we are facing issue where Aspose.Email for some reason corrupt one of the attachments which is of BMP type.

I’m attaching simple test solution with code which I’m basically running in my application. I have msg file and simply try to write it to inbox of new PST file. When I open msg file all 4 attachments are fine (before.png). Then I tried to open the result PST file in outlook and check the attachments in the message. 3 of them are fine but bmp attachment has only 4KB (should have 1 MB). See after.png.

Please try to check my code, what can be wrong.
Thanks a lot!


Hi,

Thank you for writing to Aspose support team.

Could you please confirm to us if you have initialized the license in your application? Because this is an evaluation limitation when the API is used without instantiating a license. If you don’t have a license, you may try it out with a 30-day temporary license free of cost. Please let us know if we can be of any help to you in this regard.

We are currently in the state where we tested Aspose with trial and going to buy license so if you can confirm my test project is working as expected with paid license that’s all I need to know. :slight_smile:

Hi Marek,

Please find a 30-day temporary license as attached with this email. I have tested this issue using the attached file and latest version of Aspose.Email for .NET 5.0.0, and it works fine. Please try it at your end and let us know if we can be of any help to you in this regard.

Sample Code:


MapiMessage mapiMsg = MapiMessage.FromFile(“test.msg”);

File.Delete(“test.pst”);

PersonalStorage pst = PersonalStorage.Create(“Test.pst”, FileFormatVersion.Unicode);

FolderInfo fi = pst.CreatePredefinedFolder(“Inbox”, StandardIpmFolder.Inbox);

fi.AddMessage(mapiMsg);

pst.Dispose();

Hi Kashif,


thanks a lot. With 30 days license all works as expected.

Marek

Hi Marek,


Thank you for providing the feedback. Please feel free to write us back if you have any other query in this regard…