0

I am using ImapX and C# to connect to my Gmail account. There are two snippets of code:

var folder = client.Folders["INBOX"]
var messages = folder.Search("SINCE 25-Dec-2015 FROM youtube.com", true);

This snippet returns a couple of messages sent by youtube (noreply@youtube.com) and works as expected. However, if I change the query to:

var folder = client.Folders["INBOX"]
var messages = folder.Search("SINCE 25-Dec-2015 FROM utube.c", true);

I get no messages. I was expecting that since utube.c is a substring of noreply@youtube.com the query should return the same messages.

What am I doing wrong and is there a way to search for emails using substrings of From addresses? (Other than filtering messages on the client of course)

Nitkov
  • 468
  • 6
  • 18

1 Answers1

0

The matching logic is unfortunately server dependent.

jstedfast
  • 35,744
  • 5
  • 97
  • 110