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

Free Support Forum - aspose.com

Today's date returned for EML email dates without UTC offset

When using Aspose.Email for .NET 3.2.0 we have discovered that sent and received date/times for EML emails are returned as the current date/time (ie. DateTime.Now) if the date/times in the EML file do not include a UTC offset.

For example, in the attached EML file, the sent date is “Thu, 21 May 2009 15:30:26”, but it is returned as 2013-08-05 12:28:00 when calling the following code:



Hi Reuben,

I was able to reproduce this issue at my end using Aspose.Email for .NET 3.2 and have logged it in our bug tracking system under issue id: NETWORKNET-34048. Development team will look into it and once we have any information regarding the resolution of this issue, we'll update you here via this thread.

If you have any other query/inquiry regarding Aspose.Email, please feel free to post to us. We'll try to assist you further as soon as possible.

Hi Reuben,

We have investigated this issue and found that Format of date in the sample file does not correspond to RFC2822. For loading message, please use the method Load(…) with parameter FileCompatibilityMode.SkipValidityChecking.

string fileName = Path.Combine(TestUtil.GetTestPath(), “Dates+without+UTC+offset.eml”);

MailMessage mail = MailMessage.Load(fileName,FileCompatibilityMode.SkipValidityChecking);

MapiMessage mapi = MapiMessage.FromMailMessage(mail);

DateTime? date = (mapi.GetPropertyDateTime(MapiPropertyTag.PR_CLIENT_SUBMIT_TIME));