1

I'm using SearchFolder to do a deep traversal search on an EWS connected to Office365. The problem is that I don't get all the matching email results when using FindItems for this folder. I don't get emails with HTML body that contains "text" (for Text body it work). But when I using FindItems for a normal folder it return all emails.

var subjectFilter = new SearchFilter.ContainsSubstring(ItemSchema.Subject, text, ContainmentMode.Substring, ComparisonMode.IgnoreCase);
var bodyFilter = new SearchFilter.ContainsSubstring(ItemSchema.Body, text, ContainmentMode.Substring, ComparisonMode.IgnoreCase);
var searchFilter = new SearchFilter.SearchFilterCollection(LogicalOperator.Or, subjectFilter, bodyFilter);
var findItems = service.FindItems(searchFolderID, searchFilter, view);
vangog
  • 61
  • 1
  • 8

0 Answers0