我正在使用特定日期搜索邮件。我使用带有参数DateTimeCreated,DateTimeReceived和lastModifiedTime的或过滤器。我也搜索特定的财产。
搜索查询适用于在特定日期之后接收或修改(即移动到其他文件夹)的邮件。
我注意到在特定日期之前创建的消息在特定日期之后被更改为读取或未读取的消息未被检索。如果lastModifiedTime属性发生更改,我预计邮件会更改为已读或未读。以下 我正在使用的代码:
List<SearchFilter> SearchFilterOrColletion = new List<SearchFilter>();
SearchFilterOrColletion.Add(new SearchFilter.IsGreaterThanOrEqualTo(ItemSchema.DateTimeCreated, UTCfromDate));
SearchFilterOrColletion.Add(new SearchFilter.IsGreaterThanOrEqualTo(ItemSchema.DateTimeReceived, UTCfromDate));
SearchFilterOrColletion.Add(new SearchFilter.IsGreaterThanOrEqualTo(ItemSchema.LastModifiedTime, UTCfromDate));
SearchFilter SearchOrFilter = new SearchFilter.SearchFilterCollection(LogicalOperator.Or, SearchFilterOrColletion.ToArray());
List<SearchFilter> SearchAndFilter = new List<SearchFilter>();
SearchAndFilter.Add(SearchOrFilter);
SearchAndFilter.Add(SearchFilterXprProperty);
SearchFilter.SearchFilterCollection FinalSearchFilter = new SearchFilter.SearchFilterCollection(LogicalOperator.And, SearchAndFilter.ToArray());
有没有办法让邮件设置为已读或未读? 即:
1 - Message A received 3:30 pm
2 - Message B received 4:00 pm
3 - Message A read 4:10 pm
Using my search with the time 3:50pm is returning only the message B. I was expecting the message A would be found too (due to the lastModifiedTime) property.
提前谢谢你,
答案 0 :(得分:0)
它不是更新消息的读取状态的错误不会改变上次修改时间(这一直是交换的情况),一个例外是当您回复或转发消息时,这将修改PR_LAST_VERB_EXECUTED属性,然后将更新上次修改时间。
如果您想要跟踪何时阅读消息,您需要使用http://blogs.technet.com/b/exchange/archive/2010/01/13/exchange-2010-delivery-reports.aspx,或者您可以使用EWS通知并订阅OnRead通知
干杯 格伦