0 votes
by (520 points)

Hello,

upon parsing the MailMessage objects from IMAP, I've recognized that the ImapMessageInfo.Date object equals the one from MailMessage.Date. Is that correct?

Now upon further inspection, the MailMessage object also has a property ReceivedDate that differs from the MailMessage.Date one.

ImapMessageInfo.Date
ImapMessageInfo.Date

MailMessage.Date
MailMessage.Date

MailMessage.ReceivedDate
enter image description here

Why is that? What is the difference? Why is there a discrepancy of 15 seconds between the Date and the ReceivedDate?

Applies to: Rebex Secure Mail

1 Answer

+1 vote
by (70.2k points)
selected by
 
Best answer
  • Date refers to "origination date" or "creation date" or "submit date"
  • ReceivedDate refers to "arrival date"

Origination date:
The origination date specifies the date and time at which the creator of the message indicated that the message was complete and ready to enter the mail delivery system.

Arrival date:
The arrival date specifies the date and time at which the mail delivery system received the message for processing (e.g. message was written into mailbox).

However, value of the MailMessage.Date property is taken from the 'Date' MIME header. If it is not specified, the value specified by the first 'Received' MIME header is used instead. In this case, Date and ReceivedDate have the same value (which can be null).

...