Class MailEndpointOptions

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

Options for mail endpoints (SMTP, IMAP, POP3). Bound from URI query parameters.
Provides Camel-level configurability for enterprise email integration.

public class MailEndpointOptions : EndpointOptions

Inheritance

Object→EndpointOptions→MailEndpointOptions

Inherited Members

Properties

AccessToken

OAuth2 access token (for XOAUTH2/OAUTHBEARER).

public string AccessToken { get; set; }

AdditionalFolders

Additional IMAP folders to monitor (comma-separated).

[EndpointRole(EndpointRole.Consumer)]
public string AdditionalFolders { get; set; }

AlternativeBody

Alternative body (e.g. text/plain alternative when body is HTML).

[EndpointRole(EndpointRole.Producer)]
public bool AlternativeBody { get; set; }

Attachments

Comma-separated file paths for attachments.

[EndpointRole(EndpointRole.Producer)]
public string Attachments { get; set; }

AuthMechanism

Authentication mechanism to use.

public MailAuthMechanism AuthMechanism { get; set; }

Bcc

Default BCC addresses (comma-separated).

[EndpointRole(EndpointRole.Producer)]
public string Bcc { get; set; }

Cc

Default CC addresses (comma-separated).

[EndpointRole(EndpointRole.Producer)]
public string Cc { get; set; }

ClientCertPassword

Client certificate password.

public string ClientCertPassword { get; set; }

ClientCertPath

Client certificate path for mutual TLS.

public string ClientCertPath { get; set; }

ConnectionFactory

Named from the route registry. Lets mailbox credentials

[RegistryReference(typeof(MailConnectionFactory))]
public string? ConnectionFactory { get; set; }

ConnectionTimeout

Connection timeout in milliseconds.

public int ConnectionTimeout { get; set; }

ContentType

Content type of the email body: text/plain or text/html.

[EndpointRole(EndpointRole.Producer)]
public string ContentType { get; set; }

CopyTo

Apache Camel's copyTo: an IMAP folder a message whose exchange succeeded is copied to before anything

[EndpointRole(EndpointRole.Consumer)]
public string CopyTo { get; set; }

Delay

Polling interval in milliseconds.

[EndpointRole(EndpointRole.Consumer)]
public int Delay { get; set; }

Delete

Apache Camel's delete, beside : true deletes a message whose exchange

[EndpointRole(EndpointRole.Consumer)]
public bool Delete { get; set; }

Disconnect

Whether to disconnect after each operation (default: maintain persistent connection).

public bool Disconnect { get; set; }

FetchAttachments

Whether to carry attachment payloads on the exchange (names/count always stay).

[EndpointRole(EndpointRole.Consumer)]
public bool FetchAttachments { get; set; }

FetchBody

Whether to download message body (false = headers only for envelope scanning).

[EndpointRole(EndpointRole.Consumer)]
public bool FetchBody { get; set; }

FetchFilter

Message filter for fetch (Unseen, All, Recent, Flagged, etc.), IMAP. A set selects the mails

[EndpointRole(EndpointRole.Consumer)]
public MailFetchFilter FetchFilter { get; set; }

Folder

IMAP folder to monitor (default: INBOX).

[EndpointRole(EndpointRole.Consumer)]
public string Folder { get; set; }

From

Default From address for sent emails. Can be overridden by MailHeaders.From header.

[EndpointRole(EndpointRole.Producer)]
public string From { get; set; }

FromFilter

From filter — only process messages from these addresses (comma-separated).

[EndpointRole(EndpointRole.Consumer)]
public string FromFilter { get; set; }

Host

Mail server hostname. Resolved from URI host or this parameter.

public string Host { get; set; }

Idempotent

In-memory idempotency: a message this consumer routed successfully is skipped when it is fetched again, until

[EndpointRole(EndpointRole.Consumer)]
public bool Idempotent { get; set; }

IdempotentRepository

Apache Camel's idempotentRepository: the name of an registered with

[EndpointRole(EndpointRole.Consumer)]
[RegistryReference(typeof(IIdempotentRepository))]
public string? IdempotentRepository { get; set; }

IdempotentRepositoryRemoveOnCommit

Apache Camel's idempotentRepositoryRemoveOnCommit (default true): a committed message is removed

[EndpointRole(EndpointRole.Consumer)]
public bool IdempotentRepositoryRemoveOnCommit { get; set; }

Idle

Whether to use IMAP IDLE for push notifications instead of polling.

[EndpointRole(EndpointRole.Consumer)]
public bool Idle { get; set; }

IdleTimeout

IMAP IDLE timeout in milliseconds (max time to wait before re-issuing IDLE).

[EndpointRole(EndpointRole.Consumer)]
public int IdleTimeout { get; set; }

InitialDelay

Initial delay before first poll in milliseconds.

[EndpointRole(EndpointRole.Consumer)]
public int InitialDelay { get; set; }

KeepRawMessage

Whether to keep the raw MimeMessage in exchange properties.

[EndpointRole(EndpointRole.Consumer)]
public bool KeepRawMessage { get; set; }

MapMimeHeaders

Whether to include MIME headers as exchange headers.

[EndpointRole(EndpointRole.Consumer)]
public bool MapMimeHeaders { get; set; }

MaxAge

Maximum message age in milliseconds (skip messages older than this).

[EndpointRole(EndpointRole.Consumer)]
public long MaxAge { get; set; }

MaxAttachmentSize

Maximum DECODED attachment size in bytes carried on the exchange (0 = unlimited).

[EndpointRole(EndpointRole.Consumer)]
public long MaxAttachmentSize { get; set; }

MaxMessages

Maximum number of messages to fetch per poll cycle.

[EndpointRole(EndpointRole.Consumer)]
public int MaxMessages { get; set; }

MinAge

Minimum message age in milliseconds (skip messages newer than this).

[EndpointRole(EndpointRole.Consumer)]
public long MinAge { get; set; }

MoveTo

Target folder for Move/MarkReadAndMove post-processing, and for delete=true (IMAP only); created when

[EndpointRole(EndpointRole.Consumer)]
public string MoveTo { get; set; }

Password

Password for authentication.

public string Password { get; set; }

Peek

IMAP, Apache Camel's peek: true (the default) fetches a message without marking it read, so a

[EndpointRole(EndpointRole.Consumer)]
public bool Peek { get; set; }

Port

Mail server port. 0 = auto-detect from protocol and security mode.

public int Port { get; set; }

PostProcess

What to do with a message whose exchange succeeded (Apache Camel's commit). An exchange that failed, with an

[EndpointRole(EndpointRole.Consumer)]
public PostProcessAction PostProcess { get; set; }

ReplyTo

Default Reply-To address.

[EndpointRole(EndpointRole.Producer)]
public string ReplyTo { get; set; }

SearchTerm

Apache Camel's searchTerm: which mails the consumer takes, as an option group

[EndpointRole(EndpointRole.Consumer)]
public MailSearchTerm? SearchTerm { get; set; }

Security

Connection security mode (None, Ssl, StartTls, Auto).

public MailSecurityMode Security { get; set; }

SortBy

Sort order for fetched messages.

[EndpointRole(EndpointRole.Consumer)]
public MailSortBy SortBy { get; set; }

Subject

Default subject line. Supports Simple expressions: ${header.orderId}.

[EndpointRole(EndpointRole.Producer)]
public string Subject { get; set; }

SubjectFilter

Subject filter — only process messages matching this pattern (regex).

[EndpointRole(EndpointRole.Consumer)]
public string SubjectFilter { get; set; }

Timeout

Socket read/write timeout in milliseconds.

public int Timeout { get; set; }

To

Default To addresses (comma-separated). Can be overridden by MailHeaders.To header.

[EndpointRole(EndpointRole.Producer)]
public string To { get; set; }

TrustAllCertificates

Skip server certificate validation (development only!).

public bool TrustAllCertificates { get; set; }

Username

Username for authentication.

public string Username { get; set; }

Methods

UnknownParameterHint(string)

A connector's own words for a parameter name it does not know — typically a name it used to

protected override string? UnknownParameterHint(string name)

Validate()

Validates required parameters and constraints. Called after BindFromUri.

public override void Validate()

Remarks

SMTP URI: smtp://mail.example.com:587?username=bot@ex.com&password=xxx&security=StartTls
IMAP URI: imap://mail.example.com:993?username=inbox@ex.com&password=xxx&folder=INBOX&unseen=true
POP3 URI: pop3://mail.example.com:995?username=inbox@ex.com&password=xxx&delete=true