Team,
We are facing similar issue as mentioned in https://forum.aspose.com/t/sent-date-on-email-returns-current-time/229373
The only difference is that we are facing issues with LastModified and CreatedDate as we are getting value of these dates as current datetime.
We are using MapiPropertyTag.PR_LAST_MODIFICATION_TIME and MapiPropertyTag.PR_CREATION_TIME respectively.
Please help us out
Regards,
Tejas
@tpatadiya
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): EMAILJAVA-35199
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.
Just FYI,
We are using ASPOSE.Email for .NET
I hope the fix will release for .NET as well
@tpatadiya,
Thank you. We’ll take it into account.
Hello @tpatadiya,
Could you describe in more detail the need to set the date to an empty value?
You can also set the date in your code after the conversion.
MapiMessage mapiMessage = MapiMessage.FromMailMessage(mailMessage, mco);
mapiMessage.SetProperty(MapiProperty.CreateMapiPropertyFromDateTime(MapiPropertyTag.PR_CREATION_TIME, DateTime.MinValue));
mapiMessage.SetProperty(MapiProperty.CreateMapiPropertyFromDateTime(MapiPropertyTag.PR_LAST_MODIFICATION_TIME, DateTime.MinValue));
Hello @sergey.vivsiuk,
Actually we want to retrieve LastModified and CreatedDate from given eml so setting the property is not the solution for us.
So if eml have empty value for LastModified and CreatedDate then we want to have those values accordingly instead of current date and time.
We are loading eml using MapiMessage.Load(EmlPath) and then retrieving the value of PR_CREATION_TIME and PR_LAST_MODIFICATION_TIME
@tpatadiya,
The MIME specification does not define a specific header for the creation or last modified date of an email message.
However, the Date header can be used to indicate the date and time at which the message was sent.
Could you please share with us a sample email message with appropriate headers?
@sergey.vivsiuk,
If MIME Specification does not have specific header then currently how and why aspose is assign the modified/created date to current datetime ?
Either it should return DateTime.MinValue or the proper datevalue if exists.
It Seems that This is happening for each and every eml.
Hello @tpatadiya,
We will discuss the issue and contact you as soon as we have results.
Thanks for your feedback.
Hello @tpatadiya,
We discussed the issue. We can’t just specify an empty date as many users expect the current date in a new message. We will make setting an empty date optional.
The PreserveEmptyDates option will be added to MapiConversionOptions.
If PreserveEmptyDates = true, LastModified and CreatedDate will be set to DateTime.MinValue.
Unfortunately changes cannot be added to the current release and will be released in the next version 23.9.
@tpatadiya
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): EMAILNET-41149
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.