ImapClient Inbox: SearchQuery.FromContains, SearchQuery.SubjectContains invalid
zyz opened this issue · 3 comments
zyz commented
Describe the bug
A clear and concise description of what the bug is.
Platform (please complete the following information):
- OS: [Windows 11]
- .NET Runtime: [.NET]
- .NET Framework: [.NET 9.0, .NET 4.8]
- MailKit Version: [4.8.0]
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
What's the issue?
zyz commented
SearchQuery.FromContains: Invalid search criteria for messages from specified senders.
The result is all senders' messages
jstedfast commented
Can you provide a protocol log? Sounds like a server bug based on what you've told me so far.