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

Free Support Forum - aspose.com

Email Message Receive Date is wrong

I am using ImapClient to download the mail message. MailMessage.Date is providing wrong date.


Original Email Received Date is Fri, Mar 11, 2016 at 11:48 AM

Aspose MailMessage.Date is showing 3/11/2016 4:48:08 PM

Thank you.

-Nishal

I am able to get the received date using MailMessage.Headers[“Date”]. But is there anything specific needs to be done for the (UTC) timings.


-Nishal

Hi Nishal,


ImapMessageInfo.Date and MailMessage.Date return the UTC date and time, however MailMessage.Headers[“Date”] return the local time. Here MailMessage.TimeZoneOffset contains the time zone information which can be used in conjunction with this UTC time.

Should you have any other query in this regard, please feel free to write us back.

Hallo

Is your answer really correct? If I debug our code, I must draw another conclusion:
ImapMessageInfo.Date and MailMessage.Date return the date and time in UTC not in local time.

Example: An email was sent at <18.02.2016 11:05:53> local time (UTC +01:00). If I debug our code, ImapMessageInfo.Date returns <18.02.2016 10:05:53> and Date.Kind is set to Utc, not local time.

Which conclusion is true?

Best regards

Andreas

Hi Andreas,

My apologies for writing it the other way around. I have rectified my answer and you are right. MailMessage.Date returns date and time in UTC and not in local time.