dath
dath

Reputation: 915

How do I get the time email received time using Microsoft.Office.Interop.Outlook

Newbie here, need to get a DateTime value for when each email was originally received.

EDIT: Added code. I have the item, I am just trying to get the time received but I cannot find the property for it.

            foreach (MailItem item in mailItems)
            {
                emailDetails = new OutlookEmails
                {
                    EmailFrom = item.SenderEmailAddress,
                    EmailSubject = item.Subject,
                    EmailBody = item.Body

                };
                listEmailDetails.Add(emailDetails);
                ReleaseComObject(item);
            }

Upvotes: 1

Views: 1029

Answers (1)

dath
dath

Reputation: 915

item.ReceivedTime is the answer.

Credit to: user1011627

Upvotes: 1

Related Questions