pub trait EmailSender: Send + Sync {
// Required method
fn send<'a>(
&'a self,
message: EmailMessage<'a>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'a>>;
}Expand description
Abstraction over email delivery.
Implementors are responsible for the actual transport (SMTP, SES, SendGrid,
etc.). The library provides LogEmailSender for development, which
prints the message to the tracing log instead of delivering it.
Implement this trait and pass it to the builder when email delivery is needed (password reset, email verification, etc.).