2026-02-10 15:31:31 +00:00
|
|
|
//! mailer-smtp: SMTP protocol engine (server + client).
|
2026-02-10 22:00:44 +00:00
|
|
|
//!
|
|
|
|
|
//! This crate provides the SMTP protocol implementation including:
|
|
|
|
|
//! - Command parsing (`command`)
|
|
|
|
|
//! - State machine (`state`)
|
|
|
|
|
//! - Response building (`response`)
|
|
|
|
|
//! - Email data accumulation (`data`)
|
|
|
|
|
//! - Per-connection session state (`session`)
|
|
|
|
|
//! - Address/input validation (`validation`)
|
|
|
|
|
//! - Server configuration (`config`)
|
|
|
|
|
//! - Rate limiting (`rate_limiter`)
|
|
|
|
|
//! - TCP/TLS server (`server`)
|
|
|
|
|
//! - Connection handling (`connection`)
|
|
|
|
|
|
|
|
|
|
pub mod command;
|
|
|
|
|
pub mod config;
|
|
|
|
|
pub mod connection;
|
|
|
|
|
pub mod data;
|
|
|
|
|
pub mod rate_limiter;
|
|
|
|
|
pub mod response;
|
|
|
|
|
pub mod server;
|
|
|
|
|
pub mod session;
|
|
|
|
|
pub mod state;
|
|
|
|
|
pub mod validation;
|
2026-02-10 15:31:31 +00:00
|
|
|
|
|
|
|
|
pub use mailer_core;
|
|
|
|
|
|
2026-02-10 22:00:44 +00:00
|
|
|
// Re-export key types for convenience.
|
|
|
|
|
pub use command::{AuthMechanism, SmtpCommand};
|
|
|
|
|
pub use config::SmtpServerConfig;
|
|
|
|
|
pub use data::{DataAccumulator, DataAction};
|
|
|
|
|
pub use response::SmtpResponse;
|
|
|
|
|
pub use session::SmtpSession;
|
|
|
|
|
pub use state::SmtpState;
|
|
|
|
|
|
|
|
|
|
/// Crate version.
|
2026-02-10 15:31:31 +00:00
|
|
|
pub fn version() -> &'static str {
|
|
|
|
|
env!("CARGO_PKG_VERSION")
|
|
|
|
|
}
|