2026-02-10 15:31:31 +00:00
|
|
|
//! mailer-core: Email model, validation, and RFC 5322 primitives.
|
|
|
|
|
|
feat(rust): implement mailer-core and mailer-security crates with CLI
Rust migration Phase 1 — implements real functionality in the previously
stubbed mailer-core and mailer-security crates (38 passing tests).
mailer-core: Email/EmailAddress/Attachment types, RFC 5322 MIME builder,
email format validation with scoring, bounce detection (14 types, 40+
regex patterns), DSN status parsing, retry delay calculation.
mailer-security: DKIM signing (RSA-SHA256) and verification, SPF checking,
DMARC verification with public suffix list, DNSBL IP reputation checking
(10 default servers, parallel queries), all powered by mail-auth 0.7.
mailer-bin: Full CLI with validate/bounce/check-ip/verify-email/dkim-sign
subcommands plus --management mode for smartrust JSON-over-stdin/stdout IPC.
2026-02-10 16:06:04 +00:00
|
|
|
pub mod bounce;
|
|
|
|
|
pub mod email;
|
|
|
|
|
pub mod error;
|
|
|
|
|
pub mod mime;
|
|
|
|
|
pub mod validation;
|
|
|
|
|
|
|
|
|
|
// Re-exports for convenience
|
|
|
|
|
pub use bounce::{
|
|
|
|
|
detect_bounce_type, extract_bounce_recipient, is_bounce_subject, BounceCategory,
|
|
|
|
|
BounceDetection, BounceType,
|
|
|
|
|
};
|
|
|
|
|
pub use email::{extract_email_address, Attachment, Email, EmailAddress, Priority};
|
|
|
|
|
pub use error::{MailerError, Result};
|
|
|
|
|
pub use mime::build_rfc822;
|
|
|
|
|
pub use validation::{is_valid_email_format, validate_email, EmailValidationResult};
|
|
|
|
|
|
2026-02-10 15:31:31 +00:00
|
|
|
/// Re-export mailparse for MIME parsing.
|
|
|
|
|
pub use mailparse;
|
|
|
|
|
|
feat(rust): implement mailer-core and mailer-security crates with CLI
Rust migration Phase 1 — implements real functionality in the previously
stubbed mailer-core and mailer-security crates (38 passing tests).
mailer-core: Email/EmailAddress/Attachment types, RFC 5322 MIME builder,
email format validation with scoring, bounce detection (14 types, 40+
regex patterns), DSN status parsing, retry delay calculation.
mailer-security: DKIM signing (RSA-SHA256) and verification, SPF checking,
DMARC verification with public suffix list, DNSBL IP reputation checking
(10 default servers, parallel queries), all powered by mail-auth 0.7.
mailer-bin: Full CLI with validate/bounce/check-ip/verify-email/dkim-sign
subcommands plus --management mode for smartrust JSON-over-stdin/stdout IPC.
2026-02-10 16:06:04 +00:00
|
|
|
/// Crate version.
|
2026-02-10 15:31:31 +00:00
|
|
|
pub fn version() -> &'static str {
|
|
|
|
|
env!("CARGO_PKG_VERSION")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[cfg(test)]
|
|
|
|
|
mod tests {
|
|
|
|
|
use super::*;
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn test_version() {
|
|
|
|
|
assert!(!version().is_empty());
|
|
|
|
|
}
|
|
|
|
|
}
|