Yif*_*zur 5 c# exchangewebservices
从a中查找项目时Exchange 2010 Server journaling inbox,会有一些未传递邮件的通知.
处理这些电子邮件并尝试阅读该DateTimeReceived属性时,我得到一个ServiceObjectPropertyException错误:
You must load or assign this property before you can read its value.
Run Code Online (Sandbox Code Playgroud)
有没有办法识别这样的电子邮件,或加载该DateTimeReceived属性(即使它将为null)?
我的代码是这样的:
FindItemsResults<Item> mails = folder.FindItems(searchConditions, countConstraint);
foreach (Item item in mails)
{
EmailMessage email = (EmailMessage)item;
email.Load();
DateTime receivedTime = email.DateTimeReceived;
....
}
Run Code Online (Sandbox Code Playgroud)
这些电子邮件来自日记邮箱,每封邮件都有一个受监控邮箱的副本.
没有此属性的特定电子邮件是有关从其中一个邮箱发送的电子邮件的通知,但无法传递.
通过MFCMapi我能够查看消息,并设置PR_MESSAGE_DELIVERY_TIME属性.
我不认为DateTimeReceived它被认为是一流的属性,因此您需要加载具有特定属性的电子邮件。
email.Load(new PropertySet(ItemSchema.DateTimeReceived));
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3796 次 |
| 最近记录: |