Skip to main content

Module sender

Module sender 

Source
Expand description

Product-neutral mail sender implementations.

This module owns the repeated mechanics for in-memory test delivery and SMTP delivery through lettre. Product crates still decide how runtime settings are read, how delivery errors map to their API error model, which test email copy they send, and how deliveries are audited.

Structs§

MemoryMailSender
In-memory sender that stores sent messages.
SmtpMailSender
SMTP sender that reads runtime settings immediately before each delivery.

Enums§

MailDeliveryError
Error returned by shared mail senders.

Constants§

DEFAULT_SMTP_SEND_TIMEOUT_SECS
Default timeout applied to one SMTP send attempt.

Traits§

MailSender
Product-neutral mail sender trait.

Functions§

memory_sender
Creates an in-memory sender for tests and local service wiring.
memory_sender_ref
Downcasts a sender reference to MemoryMailSender.
send_rendered_with
Sends a rendered message through a sender using the provided runtime settings for the sender envelope.
smtp_sender
Creates an SMTP sender backed by a runtime settings provider.

Type Aliases§

MailSendResult
Result type returned by shared mail senders.