我遇到了已发送邮件文件夹的问题我无法正确同步邮件。除了一切正常。你能帮忙吗?
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);
以上代码适用于除已发送项目文件夹以外的所有文件夹。它没有在交易所中正确获取物品。请协助
答案 0 :(得分:0)
SearchFilter searchFilter1 = new SearchFilter.ContainsSubstring(EmailMessageSchema.From, email.trim());
这在SentItems文件夹中是多余的,因为此文件夹仅包含从该邮箱发送的邮件的副本。我建议你放弃并重试。