Managed Exchange EWS API. Non-indivisible mail notification does not have DateTimeReceived property

When searching for items from Exchange 2010 Server journaling inbox, there are some notifications of undeliverable mail messages.

When processing these letters and trying to read a property, DateTimeReceivedI get ServiceObjectPropertyExceptionan error:

You must load or assign this property before you can read its value.

Is there a way to identify such emails or load a property DateTimeReceived(even if it is null)?

My code looks something like this:

FindItemsResults<Item> mails = folder.FindItems(searchConditions, countConstraint);
foreach (Item item in mails)
{
  EmailMessage email = (EmailMessage)item;
  email.Load();
  DateTime receivedTime = email.DateTimeReceived;
  ....
}

These emails are sent from a journaling mailbox that has a copy of the monitored mailbox with each email sent to them.

Specific emails that do not have this feature are notifications of emails sent from one of these mailboxes, but cannot be delivered.

MFCMapi , PR_MESSAGE_DELIVERY_TIME.

+5

All Articles