pub trait MailSendProvider: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn send<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
draft: &'life1 Draft,
from: &'life2 Address,
) -> Pin<Box<dyn Future<Output = Result<SendReceipt>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
// Provided method
fn save_draft<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_draft: &'life1 Draft,
_from: &'life2 Address,
) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
}Required Methods§
fn name(&self) -> &str
fn send<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
draft: &'life1 Draft,
from: &'life2 Address,
) -> Pin<Box<dyn Future<Output = Result<SendReceipt>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Provided Methods§
Sourcefn save_draft<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_draft: &'life1 Draft,
_from: &'life2 Address,
) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn save_draft<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_draft: &'life1 Draft,
_from: &'life2 Address,
) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Save a draft to the mail server. Returns the server-side draft ID if supported. Default: returns Ok(None) (provider doesn’t support server drafts).