从Exchange 2010 Server journaling inbox
中查找项目时,有一些关于未送达邮件的通知。Exchange EWS托管API - 无法确定的邮件通知没有DateTimeReceived属性
在处理这些邮件,并试图读取DateTimeReceived
财产,我得到一个ServiceObjectPropertyException
出现错误:
You must load or assign this property before you can read its value.
有识别此类邮件,或加载DateTimeReceived
财产的一种方式(即使它会空值)?
我的代码是这样的:
FindItemsResults<Item> mails = folder.FindItems(searchConditions, countConstraint);
foreach (Item item in mails)
{
EmailMessage email = (EmailMessage)item;
email.Load();
DateTime receivedTime = email.DateTimeReceived;
....
}
这些邮件是从已发送给它的每封电子邮件监控邮箱的副本的日记邮箱。
没有此属性的特定电子邮件是关于从其中一个邮箱发送但未能发送的电子邮件的通知。
通过MFCMapi我能够查看消息,并设置了PR_MESSAGE_DELIVERY_TIME
属性。
我试过了,但仍然得到同样的错误。 – Yiftizur 2011-05-25 11:11:50