Class MailSearchTerm
Apache Camel's mail searchTerm: which mails the consumer takes. Written on the URI as an option group,
searchTerm.subject=invoice&searchTerm.fromSentDate=now-24h (Camel's SimpleSearchTerm), or as
searchTerm=#name, a MailKit registered under that name, which then wins over the
simple options (IMAP only). The terms that are set are ANDed. A set search term replaces fetchFilter.
IMAP sends the terms to the server as one SEARCH. IMAP compares dates by whole days, so a date bound is also checked
on the client against the exact time: the Date header for the sent dates, the arrival time (INTERNALDATE) for the
received dates. POP3 has no search: the consumer checks every term but (POP3 keeps no flags) on
the client, and refuses at start what it cannot check: a registry search query and the received dates.
public sealed class MailSearchTerm
Inheritance
Properties
FromReceivedDate
Received (arrived on the server) at or after: , or now with an offset. IMAP only.
public string? FromReceivedDate { get; set; }
FromSentDate
Sent at or after: , or now with an offset (now-24h, now - 1d12h).
public string? FromSentDate { get; set; }
Reference
searchTerm=#name: a MailKit in the registry, sent to the IMAP server as it is.
[RegistryReference(typeof(SearchQuery))]
public string? Reference { get; set; }
ToReceivedDate
Received at or before: , or now with an offset. IMAP only.
public string? ToReceivedDate { get; set; }
Unseen
Only mails not yet seen (default true, as in Camel). IMAP only: POP3 keeps no flags.
public bool Unseen { get; set; }