jstedfast / MailKit

A cross-platform .NET library for IMAP, POP3, and SMTP.
http://www.mimekit.net
MIT License
6.23k stars 825 forks source link

ImapClient Inbox: SearchQuery.FromContains, SearchQuery.SubjectContains invalid #1843

Open zyz opened 3 hours ago

zyz commented 3 hours ago

Describe the bug A clear and concise description of what the bug is.

Platform (please complete the following information):

Expected behavior Receive messages contained by a specified sender or subject.

using (var client = new ImapClient())
{
    await client.ConnectAsync(host, port, useSsl);
    await client.AuthenticateAsync(email, password);
    var inbox = client.Inbox;
    await inbox.OpenAsync(FolderAccess.ReadOnly);
    var uids = await inbox.SearchAsync(SearchQuery.FromContains(sender));
    await client.DisconnectAsync(true); 
}

Note: if the protocol log contains sensitive information, feel free to email it to me at jestedfa@microsoft.com instead of including it in the GitHub issue.

Additional context Add any other context about the problem here.

jstedfast commented 2 hours ago

What's the issue?