Expand description
Core transport traits and per-send option types.
Transport models implementations that accept structured
email_message::Message values, while RawTransport models
implementations that send an explicit envelope plus RFC822 bytes.
Provider-specific options are carried through TransportOptions so the
core API stays transport-agnostic.
Terminology:
- A transport is the Rust abstraction/implementation used to send mail.
- A provider is the external service or protocol identity behind a
transport, such as
"resend","postmark", or"smtp". - An instance is one configured use of a provider, such as
"transactional"or"marketing".
§Adapter helpers (public API)
Several utility functions are deliberately public so adapter crates can share kernel logic without re-implementing it. They are part of the 1.0 semver surface:
accepted_recipient_emails, derive theTo + Cc + Bccenvelope recipient list from aMessage.structured_accepted_for, populateSendReport::acceptedin a structured-Transportadapter, honoring aSendOptions::envelopeoverride only when the adapter advertisesCapabilities::custom_envelope.standard_message_headers, renderSender,Date, andMessage-IDas aVec<Header>for adapters whose provider API treats them as custom headers.
Re-exports§
pub use string_newtype::STRING_NEWTYPE_MAX_BYTES;pub use string_newtype::StringNewtypeError;pub use tracing::TracingTransport;pub use email_message;pub use transport::*;
Modules§
- options
- Per-send options and provider-specific transport option storage.
- string_
newtype - Shared validation and macro support for string-backed newtypes.
- tracing
tracinginstrumentation for transport sends.- transport
Macros§
- string_
newtype - Generates a
String-backed validated newtype with the standard derives and conversion impls.