Quantcast
Channel: Aspose.Email Product Family
Viewing all articles
Browse latest Browse all 1367

New Draft Email has incorrect creation date

$
0
0
I'm creating a new draft email message on the server and then this file is transferred to the user PC which can set the recipients and send it. 

This is the code I'm using

MailMessage message = new MailMessage();
message.setSubject(subject);
message.setBody(messageBody);

MapiMessage mapiMsg = MapiMessage.fromMailMessage(message);
mapiMsg.setMessageFlags(MapiMessageFlags.MSGFLAG_UNSENT | MapiMessageFlags.MSGFLAG_FROMME);
mapiMsg.save(msgFile.getAbsolutePath());

My server time zone is EST (UTC-5), current time is 6.45am. I created a message and downloaded it to my PC. I'm in a different time zome  (UTC+1) and current time is 12.45. 
The problem is that I'm using "creation date" column which shows an incorrect date and time as it is 19.10 and I have no idea where this date comes from. I opened the message in OutlookSpy and two dates are set to the current GMT time, but two others are strange. In the result when I go to Sent Items it displayes sent date as 12.45 but the creation date as 21.10 which is incorrect.
Why is it nor working correctly? Why the creation date is so strange?

Thanks in advance for your help,
Regards,
Mariusz Pala



Viewing all articles
Browse latest Browse all 1367