New Draft Email has incorrect creation date

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


Notice that even the creation date is wrong. Our customer have a similar problem and the time difference between the real time and the creation date in the email message is something around -6h38m - sent date is June 11th, 9.47am, creation date is June 10th, 9.09pm, for me it’s 7 days!

Hi Mariusz,


After an initial investigation, I could not reproduce this issue at my end using the latest version of Aspose.Email for Java [EDIT: 3.0]. All the dates for the newly created email message are set properly to the current date and time of my system. Could you please arrange a test account for us on your server so that we can further investigate this issue? We’ll look into it and assist you further.

I noticed that the creation time is always set to the web app startup time. Previously the server was not restarted for a week and the date was set to the startup date (June 5th, 19:10). I restarted the server this morning and after 20 minutes I tried to create an email and again the creation date (and all other dates) are set to the server startup date. The only thing initialized on startup is the Aspose license. Can it be related?

BTW, I don’t see v5.5.0, we’re using 2.8 and the latest one is 3.0.

Hi Mariusz,


Could you please provide us your server information and its locale?

It happens on all the servers. I use Windows Server 2003 and 2008, our customer uses Solaris. Locale is GMT-5. The creation date is always set to the web app startup date - the time when the Aspose license is initialized.

Hi Mariusz,


Thank you for the additional information.

I was able to reproduce this issue at my end using a test application with Glass Fish server running at my end. Since Aspose.Email for Java is autoported from its .NET version, I also tested this issue with equivalent .NET version but it’s not reproducible there. For further investigation into this issue, I’ve logged this issue as NETWRKJAVA-33276 in our issue tracking system and will update you here as soon as there is some work around method or solution suggested by the development team.

The issues you have found earlier (filed as NETWRKJAVA-33276) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.