title: EWS SearchFilter.ContainsSubstring to filter on Sender Email Address
body: <p>I'm trying to filter emails on Exchange Web Services using SearchFilter.ContainsSubstring as follows:</p>
  
  <pre><code>sfilter = New SearchFilter.ContainsSubstring(EmailMessageSchema.Sender, EmailAddress, ContainmentMode.Substring, ComparisonMode.IgnoreCase)
  MailItems = service.FindItems(Folder.Id, sfilter, view)
  </code></pre>
  
  <p>Unfortunately this doesn't work, and I don't want to use Queries, because I can't guarantee that I can use features of Exchange Server 2013.</p>
  
  <p>Composing a variety of requests in Fiddler, I can observe that if I remove the last character of the email address, then the filter works, remove the first character instead, works - put them back, broken.</p>
  
  <p>So perhaps it's pedantic, and it has to be a true substring to qualify, so if I change the Containment mode to FullString - it doesn't work, so I can't do anything like a collection with Substring OR FullString.</p>
  
  <p>It looks like I'll be able to do (Substring with last char missing AND Substring with first char missing), but it surely can't be that broken can it?</p>
  
  <p>What can I do to get this to work?</p>
  
  <p>Note that my code is in VB.NET, but I can't imagine that this is the problem.</p>
  
  <p>Cheers,</p>
  
  <p>Mark</p>