Free Support Forum - aspose.com

What is exactly de MailMessage.Date property for an incoming email?

Hi,

Could you please tell me what exactly represents the MailMessage.Date for an incoming email. Is it :

- the date when the sender wrote the email

- the date when the SMTP server sent the email (first attempt or last attempt)

- the date when the POP/IMAP server received the email

- the date when Aspose.Network downloaded the email

or another date?

Thank you!

Hi,

Thank you for inquiry.

MailMessage.Date represents the date when the sender wrote the email.
When the message is received by POP/IMAP server, it adds information in “Received” header like IP address and received date.

MailMessage msg = MailMessage.Load(“test.eml”, MessageFormat.Eml);
Console.WriteLine("Sent date: " + msg.Date);
Console.WriteLine("Received datetime from Headers: " + msg.Headers.Get(“Received”));