+1 vote

On the mail object, we only have a Date property which is the forwarded date or delivered date. Couldn't we have both properties as we mostly interested in the delivered date?

by

1 Answer

0 votes
 
Best answer

IMail.Date represents email's "Date" header - it is set by the client when the message is sent (so theoretically it can contain incorrect or bogus values).

Only other email headers that contain date/time information are "received" headers, exposed through IMail.Received property. Each SMTP server, involved in email message transportation, should add such header when it receives a message)

If you use IMAP, you could also use IMAP's internal date - it is exposed on Envelope.InternalDate object (Imap.GetEnvelopeByUID) and MessageInfo.Envelope.InternlDate (Imap.GetMessageInfoByUID):
https://www.limilabs.com/blog/get-email-information-from-imap-fast

It is recorded by your IMAP server, when message is received. Internal date is not stored in an email object in any way (not part of a MIME tree nor any header), so it is not accessible through IMail instance.

by (297k points)
...