pub trait EmailProvider: Send + Sync {
// Required method
fn send<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
to: &'life1 str,
subject: &'life2 str,
html: &'life3 str,
text: &'life4 str,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait;
}Expand description
Trait for sending emails. Implement this to integrate with your email service (SMTP, SendGrid, SES, etc.).
Required Methods§
Sourcefn send<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
to: &'life1 str,
subject: &'life2 str,
html: &'life3 str,
text: &'life4 str,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
fn send<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
to: &'life1 str,
subject: &'life2 str,
html: &'life3 str,
text: &'life4 str,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
Send an email.
to: recipient email addresssubject: email subject linehtml: HTML body (may be empty)text: plain-text body (may be empty)