MailMessageDateReceived Property |
Namespace: MailBee.Mime
For an existing message, this property value is taken from Received headers of this message. When a new message is created using MailBee or if the existing message does not contain any Received headers, this property will return MinValue. If the e-mail message contains several Received headers, then the most recent one will be used to obtain DateReceived value.
When downloading messages from IMAP server, it's more reliable to use Envelope.DateReceived instead. Date information is always available in an IMAP envelope while Received header may be missing in a message.
To get or set the date when the message was composed, use Date property.
Note |
---|
By default, all dates are adjusted to UTC (GMT) timezone. To adjust to local time, set DatesAsUtc property of Parser object to true. |
using System; using MailBee; using MailBee.Pop3Mail; using MailBee.Mime; class Sample { static void Main(string[] args) { // Download the first mail message from the specified POP3 account. MailMessage msg = Pop3.QuickDownloadMessage("mail.company.com", "bill", "secret", 1); Console.WriteLine("This message was received at " + msg.DateReceived.ToString()); } }