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

Free Support Forum - aspose.com

Issue with smiley faces not in PST File using aspose.email for java

Hello Team ,

I have convert MBOX to PST. But in my MBOX contains some smiley faces. After converting MBOX to PST smiley faces is not there.
Please help me.


Thank you for writing to Aspose Support team.

Could you please share your sample MBOX file and the complete sample runnable code with us for investigating this issue further? We’ll look into it for assisting you accordingly.
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: #4e9072} p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #3933ff} p.p5 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #931a68} span.s1 {color: #931a68} span.s2 {color: #3933ff} span.s3 {color: #000000} span.s4 {color: #0326cc} span.s5 {text-decoration: underline} span.Apple-tab-span {white-space:pre}

File emlFileDirectory = new File("/Users/debssish/Desktop/New");

File[] emlFilePathArray = emlFileDirectory.listFiles();


// MailMessage message = MailMessage.load(dataDir + "EmailWithAttandEmbedded.eml");

// parseMessage(message, dataDir);

String dst = "/Users/debssish/Desktop/" + "Sys_Sample.pst";

File f_StrFileName = new File(dst);





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,

Could you please share your sample code read from this file as we are not able to get any message file from it. If possible, please extract the message from this file and share with us as EML so that we can add it directly to PST and investigate the issue further. We’ll look into it for assisting you further.

Hi Kashif ,

I have already added code. I am just adding samples in the form of .EML file.


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=“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 issue, but please note that this is not something related to the Aspose.Email API. Instead, Microsoft Outlook isn’t able to display the smiley face 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 smiley faces are displayed fine in Thunderbird as well. Thus, it seems that MS Outlook replaces the Smiley faces with “:)” itself and displays it this way. Please feel free to write to us if you have any further query in this regard.