Expand description
Transactional application mail. Queued sends are at-least-once, not exactly-once. Secrets and attachment contents belong in application-owned protected storage, never in generic plaintext job payloads. SMTP provider acceptance is not inbox delivery.
Re-exports§
Modules§
- notifications
- Small mail notifications, with explicit synchronous or queued delivery at the call site.
Structs§
- Attachment
- An in-memory attachment. No path is opened implicitly; applications own file access.
- Capture
Transport - Bounded in-memory test transport; runs real rendering, parsing and MIME construction.
- Captured
Mail - Explicitly inspectable message, redacted in Debug. Never include contents in logs.
- Delivery
Receipt - Provider acceptance, not a guarantee of inbox delivery or exactly-once effects.
- Development
Inbox - Private disk-backed development inbox shared by HTTP, workers and
capy mail. Retains at most 100 messages/64 MiB until explicitly cleared; a full inbox fails delivery instead of silently evicting. No network listener or HTML renderer exists. Files contain plaintext development secrets: never use production recipient data. - Envelope
- A typed mailable and parsed primary recipient. Debug is redacted.
- LogTransport
- Development sink: lifecycle metadata only, never body, subject or recipients.
- Application-owned content. It is deliberately not serializable.
- Mail
Context - HTTP extractor for the shared mail service installed by
App::mail/with_mail. - Mail
Observation - A payload-free lifecycle observation for application telemetry.
- Mail
Settings - Conventional outbound mail settings; activated by
App::mail. - Mailbox
- A parsed mailbox; debug output never reveals the address or display name.
- Mailer
- Cloneable mail service. Clones share transport policy and application observer hooks.
- Prepared
Mail - MIME message and explicit metadata for a transport. Debug never includes contents.
- Smtp
Settings - SMTP settings. TLS is mandatory in production; no opportunistic downgrade.
Enums§
- Mail
Error - Safe error categories. Raw SMTP responses/credentials/content are never retained.
Traits§
- Mail
Observer - Nonblocking application metrics hook. Contains no subject/body/recipient fields.
- Mail
Transport - A small application-owned transport, independent of SMTP/Jobs implementation details.
- Mailable
- Typed application template/context; business code remains ordinary Rust.
- Queueable
Mail - Explicit assertion that this mailable contains no secrets or private attachments.
Implement only after reviewing rendered text/HTML, headers and addresses for storage
in plaintext queue rows/backups. There is deliberately no blanket implementation.
Implement as
impl QueueableMail for WelcomeMail {}only after reviewing the complete rendered output. Usemailer.queue(&ctx, welcome.to(address)?).await?for ordinary content, orqueue_infor transactionally safe enqueue. Secrets such as reset/activation links and private attachments must use direct delivery or an application-owned protected outbox instead. Queueing is at least once; a successful SMTP send can still be repeated after a worker crash.
Type Aliases§
- Mail
Result - Mail-specific safe result.