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

Free Support Forum - aspose.com

Issue with Animated images in PST using aspose.email for java

Hello Team,

I have convert MBOX to PST. but in my MBOX contains some animated images. After creating PST animated images(GIF) not in PST file.They gets skipped from PST.

Please help me.

Hi Ajinath,

Thank you for writing to Aspose Support team.

Could you pleas share your sample MBOX file and the code sample you are trying at your end with us? We need it for further investigation at our end and assisting you in this regard.
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px} p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #931a68} span.s1 {color: #0326cc} span.s2 {color: #3933ff} span.s3 {color: #000000} span.s4 {color: #931a68} span.s5 {text-decoration: underline} span.Apple-tab-span {white-space:pre}

PersonalStorage pst = PersonalStorage.create(dst,FileFormatVersion.Unicode);

FolderInfo inboxFolder = pst.createPredefinedFolder("Inbox", StandardIpmFolder.Inbox);



for(File emlFile:emlFilePathArray)


msg = MailMessage.load(emlFile.getAbsolutePath());

MapiMessage message = null;


if(msg != null)

message= MapiMessage.fromMailMessage(msg,MapiConversionOptions.getUnicodeFormat());

boolean isread = (message.getFlags() & MapiMessageFlags.MSGFLAG_READ) == MapiMessageFlags.MSGFLAG_READ;

MailPriority f_Priority = msg.getPriority();


if(message != null)



Hi Ajinath,

Can you please share your sample code with us for reading from this MBOX file? We have tried to read the sample messages from it but no message is read from it. If possible, you can extract the specific EML file from it, save it to disc and provide us that so that we can add it to the PST for further investigation. We’ll look into it for assisting you further.

Hi Kashif,

I have already added sample code there.I am just adding sample in the form of .EML File .please help me.


Thank you for sharing the sample file.

We have opened it in MS Outlook on our Windows machine but there is no animated image in it. Please have a look at the attached image Original files.png and attached output file which shows that the output in PST is the same as the original file. This shows that the generated PST file has the the EML in the same format as the original. Please try it with the latest version of the API and let us know your feedback.

Sample Code:

<pre style=“background-color: rgb(255, 255, 255); font-family: “Courier New”; font-size: 9pt;”>PersonalStorage pst = PersonalStorage.create(“815874\test.pst”, FileFormatVersion.Unicode);

FolderInfo fi = pst.getRootFolder().addSubFolder(“Test”);

//for (string file in Directory.GetFiles(“815874\”, “*.eml”))
MailMessage eml = MailMessage.load(“815874\animated image.eml”);

MapiMessage msg = MapiMessage.fromMailMessage(eml, MapiConversionOptions.getUnicodeFormat());


eml = MailMessage.load(“815874\Smili Facess.eml”);

msg = MapiMessage.fromMailMessage(eml, MapiConversionOptions.getUnicodeFormat());



Hi Kashif,

Can you please open mbox file in thunderbird on windows machine.I have alrady given you mbox sample in zip format.If you open that sample in thunderbird then you will be found some difference between animated image and you exported samples.

Thanks & Regards
Ajinath Kharade

Hi Ajinath,

We are able to observe the animated image in Thunderbird, but please note that this is not something related to the Aspose.Email API. Instead, Microsoft Outlook isn’t able to display the animated GIF as Thunderbird. If we re-save the file as EML using Aspose.Email and open the file in Thunderbird again, we see that Aspose.Email API doesn’t do anything wrong to it and the animated GIF is displayed fine in Thunderbird as well. This is sort of limitation at MS Outlook end as discussed in following links:

Please feel free to write to us if you have any further query in this regard.