已发送邮件文件夹邮件未正确同步

时间:2016-11-30 11:39:46

标签: email office365 exchange-server exchangewebservices ewsjavaapi

我遇到了已发送邮件文件夹的问题我无法正确同步邮件。除了一切正常。你能帮忙吗?

SearchFilter.SearchFilterCollection searchFilterCollection1 = new SearchFilter.SearchFilterCollection(LogicalOperator.Or);
SearchFilter searchFilter1 = new SearchFilter.ContainsSubstring(EmailMessageSchema.From, email.trim());
SearchFilter searchFilter2 = new SearchFilter.ContainsSubstring(EmailMessageSchema.DisplayTo,email.trim());
SearchFilter searchFilter3 = new SearchFilter.ContainsSubstring(EmailMessageSchema.DisplayCc,email.trim());
searchFilterCollection1.add(searchFilter1);
searchFilterCollection1.add(searchFilter2);
searchFilterCollection1.add(searchFilter3);
FindItemsResults findResults = service.findItems(folder.getId(),earchFilterCollection1, view);

以上代码适用于除已发送项目文件夹以外的所有文件夹。它没有在交易所中正确获取物品。请协助

1 个答案:

答案 0 :(得分:0)

SearchFilter searchFilter1 = new SearchFilter.ContainsSubstring(EmailMessageSchema.From, email.trim());

这在SentItems文件夹中是多余的,因为此文件夹仅包含从该邮箱发送的邮件的副本。我建议你放弃并重试。