How to get the "Date" of an email?

Tavousi picture Tavousi · Oct 3, 2012 · Viewed 12.7k times · Source

I create an application that gets email from mail server. I use "System.Net.Mail.MailMessage" for receive email. Now I want to get "Date and Time" of each email that ins in Inbox.

Answer

Micah Armantrout picture Micah Armantrout · Oct 3, 2012

You will want to look at the emails headers here is some documentation

http://msdn.microsoft.com/en-us/library/system.net.mail.mailmessage.headers.aspx

message.Headers["Date"];