Path: redb-route/redb.Route.Mail/MailHeaders.cs Snapshot: redb-route, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages. License: Apache-2.0. Repository: https://github.com/redbase-app/redb-route Page: https://redbase.app/src/dev-2026-12-06/redb-route/redb.Route.Mail/MailHeaders.cs ---- namespace redb.Route.Mail; /// /// Header constants for email messages in the redb.Route pipeline. /// All headers use the "redbMail." prefix. /// public static class MailHeaders { /// Header prefix for all mail-related headers. public const string Prefix = "redbMail."; // ── Addressing ──────────────────────────────────────────────────── /// Sender address (RFC 5322 From). public const string From = "redbMail.From"; /// Comma-separated recipient addresses (To). public const string To = "redbMail.To"; /// Comma-separated CC addresses. public const string Cc = "redbMail.Cc"; /// Comma-separated BCC addresses. public const string Bcc = "redbMail.Bcc"; /// Reply-To address. public const string ReplyTo = "redbMail.ReplyTo"; /// Sender (envelope sender, may differ from From). public const string Sender = "redbMail.Sender"; // ── Subject & identifiers ───────────────────────────────────────── /// Email subject line. public const string Subject = "redbMail.Subject"; /// Message-ID header (RFC 2822). public const string MessageId = "redbMail.MessageId"; /// In-Reply-To header (thread reference). public const string InReplyTo = "redbMail.InReplyTo"; /// References header (full thread chain). public const string References = "redbMail.References"; // ── Content ─────────────────────────────────────────────────────── /// MIME content type of the body (text/plain, text/html, multipart/mixed). public const string ContentType = "redbMail.ContentType"; /// Whether the email body is HTML. public const string IsHtml = "redbMail.IsHtml"; /// Plain text body (when multipart, the text/plain alternative). public const string TextBody = "redbMail.TextBody"; /// HTML body (when multipart, the text/html alternative). public const string HtmlBody = "redbMail.HtmlBody"; // ── Attachments ─────────────────────────────────────────────────── /// Number of attachments. public const string AttachmentCount = "redbMail.AttachmentCount"; /// Whether the message has attachments. public const string HasAttachments = "redbMail.HasAttachments"; /// Comma-separated attachment file names. public const string AttachmentNames = "redbMail.AttachmentNames"; // ── Date & timestamps ───────────────────────────────────────────── /// Date header from the email. public const string Date = "redbMail.Date"; /// Date the email was received (IMAP internal date). public const string ReceivedDate = "redbMail.ReceivedDate"; // ── Flags & metadata ────────────────────────────────────────────── /// IMAP message UID. public const string Uid = "redbMail.Uid"; /// IMAP/POP3 message index (sequence number). public const string Index = "redbMail.Index"; /// IMAP folder name where the message was found. public const string Folder = "redbMail.Folder"; /// IMAP message flags (Seen, Answered, Flagged, etc.). public const string Flags = "redbMail.Flags"; /// /// Prefix for raw MIME headers copied onto the exchange when mapMimeHeaders=true: /// redbMail.Mime.<Field> (e.g. redbMail.Mime.X-Custom-Track). /// public const string MimePrefix = "redbMail.Mime."; /// Message size in bytes. public const string Size = "redbMail.Size"; /// Message priority (Urgent, Normal, NonUrgent). public const string Priority = "redbMail.Priority"; // ── Commit of a consumed message (set by the route) ─────────────── /// /// Set by the route to override the endpoint at commit time (Apache Camel's CamelMailDelete): true /// deletes the message, false marks it read instead (IMAP) or keeps it on the server (POP3). Read from the /// message the route ended with, only when the exchange succeeded. /// public const string Delete = "redbMail.Delete"; /// /// Set by the route to move the consumed message to this IMAP folder at commit time (Apache Camel's /// CamelMailMoveTo); marked read first unless is true. Created when missing; /// POP3 ignores it. /// public const string MoveTo = "redbMail.MoveTo"; /// /// Set by the route to copy the consumed message to this IMAP folder at commit time, before anything else is done /// to it (Apache Camel's CamelMailCopyTo). Created when missing; POP3 ignores it. /// public const string CopyTo = "redbMail.CopyTo"; // ── Protocol info ───────────────────────────────────────────────── /// Protocol used to retrieve the message (imap, pop3). public const string Protocol = "redbMail.Protocol"; /// Whether the connection used TLS/SSL. public const string Secure = "redbMail.Secure"; /// /// Checks whether a header key belongs to the redbMail namespace. /// public static bool IsRedbHeader(string key) => key.StartsWith(Prefix, StringComparison.Ordinal); }