Path: redb-route/redb.Route.Mail/MailEnums.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/MailEnums.cs
----
namespace redb.Route.Mail;
/// Security mode for mail connections.
public enum MailSecurityMode
{
/// No encryption (port 25/110/143).
None,
/// Implicit SSL/TLS — connect encrypted from the start (port 465/993/995).
Ssl,
/// Explicit STARTTLS — upgrade cleartext to TLS after connect (port 587/143/110).
StartTls,
/// Auto-detect based on port number.
Auto
}
/// Authentication mechanism for mail connections.
public enum MailAuthMechanism
{
/// Auto-select (let MailKit choose the best available).
Auto,
/// PLAIN (RFC 4616).
Plain,
/// LOGIN.
Login,
/// CRAM-MD5 (RFC 2195).
CramMd5,
/// XOAUTH2 (Google, Microsoft).
XOAuth2,
/// OAUTHBEARER (RFC 7628).
OAuthBearer,
/// NTLM (Windows Integrated).
Ntlm
}
/// What to do with messages after processing (consumer).
public enum PostProcessAction
{
/// Leave message untouched.
None,
/// Mark as read (IMAP: set \Seen flag).
MarkRead,
/// Delete the message.
Delete,
/// Move to another folder (IMAP only).
Move,
/// Mark as read and move to another folder (IMAP only).
MarkReadAndMove,
/// Flag the message (IMAP: set \Flagged).
Flag
}
/// Sort order for fetched messages.
public enum MailSortBy
{
/// No sorting (server order).
None,
/// Oldest first (by date).
DateAsc,
/// Newest first (by date).
DateDesc,
/// By subject ascending.
SubjectAsc,
/// By sender ascending.
FromAsc,
/// By size ascending.
SizeAsc,
/// By size descending.
SizeDesc
}
/// IMAP search filter for message selection.
public enum MailFetchFilter
{
/// Only unseen (unread) messages.
Unseen,
/// All messages.
All,
/// Only recent messages (IMAP \Recent flag).
Recent,
/// Only flagged messages.
Flagged,
/// Only answered messages.
Answered,
/// Unanswered messages.
Unanswered
}