Class MailSearchTerm

Namespace: redb.Route.Mail
Assembly: redb.Route.Mail.dll

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

Object→MailSearchTerm

Properties

Body

Text the body contains.

public string? Body { get; set; }

From

Text the From address contains.

public string? From { get; set; }

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; }

Subject

Text the subject contains.

public string? Subject { get; set; }

SubjectOrBody

Text the subject or the body contains.

public string? SubjectOrBody { get; set; }

To

Text a To address contains.

public string? To { get; set; }

ToReceivedDate

Received at or before: , or now with an offset. IMAP only.

public string? ToReceivedDate { get; set; }

ToSentDate

Sent at or before: , or now with an offset.

public string? ToSentDate { get; set; }

Unseen

Only mails not yet seen (default true, as in Camel). IMAP only: POP3 keeps no flags.

public bool Unseen { get; set; }