Development environment: C#, Core 3.1, MailKit 3.5.0, Apache James 3.3.0
Using the same code, after restarting the James service, the old emails will not be found.
using (var imapClient = new ImapClient())
{
var sent = imapClient.GetFolder("Sent");
sent.Open(FolderAccess.ReadOnly);
var query = SearchQuery.DeliveredAfter(DateTime.Parse("2023-02-01")).And(SearchQuery.All);
var uids = sent.Search(query);
}
The goal is to use SearchQuery in Imap mode to query the sendbox mailing list after a certain date
Your search query should work unless the IMAP server is broken.
FWIW, I'm not sure why you are combining your date query with ALL:
You can just use this:
Maybe simplifying your query will be less confusing to your server?