Hello
How do I get the received date time from an email via IMAP (Aspose.Email v6.2.0.0)?
The following code retrieves the received date:
ImapClient client = new ImapClient(“[imap.domain.com](http://imap.domain.com/)”, 143, "user@domain.com", “password”, SecurityOptions.Auto);
client.SelectFolder(ImapFolderInfo.InBox);
ImapMessageInfoCollection coll = client.ListMessages();
foreach(ImapMessageInfo info in coll)
{
MailMessage mail = client.FetchMessage(info.SequenceNumber);
string receivedDateTime = mail.Headers["Received"].ToString();
}
The receivedDateTime variable contains a string like:
from AM2PR05MB1027.eurprd05.prod.outlook.com (10.161.234.152) by AM2PR05MB1025.eurprd05.prod.outlook.com (10.161.234.150) with Microsoft SMTP Server (TLS) id 15.1.409.15 via Mailbox Transport; Mon, 15 Feb 2016 10:40:16 +0000,from AM2PR05MB1025.eurprd05.prod.outlook.com (10.161.234.150) by AM2PR05MB1027.eurprd05.prod.outlook.com (10.161.234.152) with Microsoft SMTP Server (TLS) id 15.1.409.15; Mon, 15 Feb 2016 10:40:15 +0000,from AM2PR05MB1025.eurprd05.prod.outlook.com ([10.161.234.150]) by AM2PR05MB1025.eurprd05.prod.outlook.com ([10.161.234.150]) with mapi id 15.01.0409.017; Mon, 15 Feb 2016 10:40:15 +0000
How I am supposed to filter out the date received?
Is this a bug or is there another way to retrieve the received date?
Best regards
Andreas