Skip to main content

EmailProvider

Trait EmailProvider 

Source
pub trait EmailProvider: Send + Sync {
    // Required method
    fn send_email<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        to: &'life1 str,
        subject: &'life2 str,
        body: &'life3 str,
    ) -> Pin<Box<dyn Future<Output = WaeResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
}
Expand description

邮件提供者 trait

定义邮件发送的统一接口。

Required Methods§

Source

fn send_email<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, to: &'life1 str, subject: &'life2 str, body: &'life3 str, ) -> Pin<Box<dyn Future<Output = WaeResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

发送邮件

§参数
  • to: 收件人邮箱地址
  • subject: 邮件主题
  • body: 邮件正文(纯文本)

Implementors§