mailbourne_core/lib.rs
1//! # mailbourne-core — the vocabulary
2//!
3//! Start here. These are the nouns of email that every other crate shares.
4//!
5//! The single most important idea in this crate — and in all of email — is
6//! the difference between the **envelope** and the **message**:
7//!
8//! - The [`envelope::Envelope`] is what the *servers* read: who to bounce to
9//! (`MAIL FROM`) and where to deliver (`RCPT TO`). Like the outside of a
10//! paper envelope, it is thrown away after delivery.
11//! - The [`message::Message`] is the letter inside: the headers your mail
12//! client shows (`From:`, `Subject:`) and the body. The receiving server
13//! has no obligation to make it match the envelope — that mismatch is how
14//! BCC works, and policing it is what SPF/DKIM/DMARC are for.
15//!
16//! Reading order: [`address`] → [`envelope`] → [`message`] → [`event`] → [`config`].
17
18pub mod address;
19pub mod config;
20pub mod envelope;
21pub mod event;
22pub mod message;
23
24pub use address::EmailAddress;
25pub use envelope::Envelope;
26pub use event::MailEvent;
27pub use message::Message;