pub trait Mailer: Send + Sync {
// Required method
fn send<'a>(
&'a self,
msg: Mail,
) -> Pin<Box<dyn Future<Output = Result<(), MailerError>> + Send + 'a>>;
}Expand description
Async outbound-mail interface. Project implementations live in
the project crate so the framework never imports lettre /
aws-sdk-ses / etc.
Implementations MUST be Send + Sync and cheap to clone (the
framework holds a single Arc<dyn Mailer> for the lifetime of
the process).
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".