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

Free Support Forum - aspose.com

Wrong Sent Date after creating EML from PST file (Aspose.Email for Java API)

Hi ,
I have to create EML from PST file. I am using PST reader for read the PST file. Please find the source code and sample attachment file to test at your end.

** source code : - **
MailMessage f_objMailMessage = null;
MapiMessage f_objMapiMessage = null;
IGenericEnumerable f_mapiMessageCollection =
MailConversionOptions f_mailConversionOption = null;

IGenericEnumerator f_Iterator = f_mapiMessageCollection.iterator();

f_objMapiMessage = f_Iterator.next();
if (f_objMapiMessage != null && f_objMapiMessage.getMessageClass().equals(“IPM.Note”))
f_mailConversionOption = new MailConversionOptions();
f_objMailMessage = p_objMapiMessage.toMailMessage(f_mailConversionOption);

** source sample :- **
SentDate.pst.zip (10.3 KB)


Thank you for writing to Aspose support team.

This PST is opened in Outlook 2013 and message from “test date” folder is dragged to desktop. This message is opened in Outlook 2013 and sent date is observed.

Now above mentioned code is executed using Aspose.Email and output EML file is opened in Outlook 2013. It is observed that both the dates are similar and no issue is observed. Could you please explain the issue and provide steps to re-produce the problem? It will help us to observe the problem and provide assistance accordingly.

Hello Kashif,
Can you please see the output EML in the Apple Mail on Mac OS X. There you will see the issue. In source mail actual date is 20 Oct 2016 and after export i got date as 19 oct 2016. Please check on Mac OS X machine not windows machine.


We were able to observe the problem on Mac OS and have logged it as EMAILJAVA-34321 for further investigation by our Product team. We’ll update you here once there is some feedback or a fix version available in this regard.

Please provide me the quick solution for that issue. I am to much waiting for this issue. My task is gets pending due to that. Please provide me the solution for that…


This is not a bug of AE. The reason is that Outlook displays date from Date header of eml file(correspond PR_CLIENT_SUBMIT_TIME in MSG format). However, MacOS Mail displays date from Received header of eml file(correspond PR_MESSAGE_DELIVERY_TIME in MSG format). The difference between PR_CLIENT_SUBMIT_TIME and PR_MESSAGE_DELIVERY_TIME describe here:

Thus, as per our findings, this is not a bug of Aspose.Email API and is something related to MacOS Mail.

Please try to get date of this sample please.

Refer above code as well as this line
Date f_objMailDate = p_ObjMapiMessage.getClientSubmitTime();

Input PST Sample:- test_no_date.pst.zip (10.5 KB)


The PST file you have shared doesn’t have any message that has ClientSubmitTime as observed through OutlookSpy and doesn’t relate to the original problem you have shared earlier.

How to read Creation Time and Last Modification Time.


You can use the PR_CREATION_TIME and PR_LAST_MODIFICATION_TIME to get this information from message as shown in the following code sample.

Sample Code


The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan