Skip to main content

MailSendProvider

Trait MailSendProvider 

Source
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§

Source

fn name(&self) -> &str

Source

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§

Source

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).

Implementors§