Skip to main content

Crate daaki_smtp

Crate daaki_smtp 

Source
Expand description

daaki SMTP client library.

An async SMTP client (RFC 5321) built on tokio and rustls. Handles connection, authentication, and message transmission. Does NOT construct RFC 5322 messages — it sends raw bytes provided by the caller.

§Connection ownership

SmtpConnection methods take &self — the connection can be shared across async tasks via Arc<SmtpConnection>. An internal tokio::sync::Mutex serializes operations, since SMTP is a strictly serial protocol (RFC 5321 Section 3.1) with no command tagging.

[daaki_imap::ImapConnection] also takes &self but achieves concurrency-safety through a driver-task architecture instead: a dedicated tokio task owns the stream, and the handle communicates via channels (RFC 3501 Section 5.5 permits overlapping commands via unique tags, so true pipelining is possible).

Re-exports§

pub use error::Error;
pub use types::AddressLiteral;
pub use types::AuthMechanism;
pub use types::BodyType;
pub use types::DeliverBy;
pub use types::DeliverByMode;
pub use types::Domain;
pub use types::DomainOrLiteral;
pub use types::DsnNotify;
pub use types::DsnRet;
pub use types::EnhancedStatusCode;
pub use types::EnvidValue;
pub use types::ForwardPath;
pub use types::LmtpSendResult;
pub use types::MailFromParams;
pub use types::Mailbox;
pub use types::Protocol;
pub use types::RcptToParams;
pub use types::RecipientResult;
pub use types::RejectedRecipient;
pub use types::ReversePath;
pub use types::SendResult;
pub use types::ServerCapabilities;
pub use types::SmtpAuthParam;
pub use types::SmtpExtension;
pub use types::SmtpResponse;
pub use types::XtextSafe;

Modules§

error
Error types for SMTP operations.
types
SMTP protocol types.

Structs§

Address
Re-export the canonical Address type from daaki-message so consumers can use a single Address type across the IMAP, SMTP, and message crates without manual field-by-field conversion. An email address with optional display name.
SmtpConnection
An SMTP/LMTP client connection.
ValidationError
Error returned when constructing a validated protocol type from an invalid string.

Enums§

TlsMode
TLS mode for the initial connection (RFC 8314).

Type Aliases§

Result
Result type alias for SMTP operations.