+1 vote

The email.date Field is actually not the date that an email is available in the inbox. How do I make sure that is correct.

Basically I have an unknown amount of emails where the carrier (provider/host) delayed the message (12.5 hours in this case).

Limilabs.email sees the date that is in the header but there are other dates that are actually valid

by

1 Answer

0 votes
 
Best answer

IMail.Date represents the email's "Date" header. Date header is set by
a sender, not a receiver.

If you want to get the date/time of when the email was received by
your IMAP server, you can use INTERNALDATE.
Imap.GetMessageInfoByUID retrieves several email IMAP parameters,
including INTERNALDATE.

List<MessageInfo> infos = imap.GetMessageInfoByUID(uids);
DateTime? internalDate = infos[0].InternalDate;

InternalDate is assigned by the IMAP server.

You can also examine IMail.Received collection - it contains all "Received" headers parsed. Those are added to each message by every server, that relays the email.

by (297k points)
...