pub struct SmtpEmailProvider { /* private fields */ }Expand description
SMTP 邮件提供者
通过 SMTP 协议发送邮件,支持 STARTTLS 加密和认证。
Implementations§
Source§impl SmtpEmailProvider
impl SmtpEmailProvider
Sourcepub fn new(config: SmtpConfig) -> Self
pub fn new(config: SmtpConfig) -> Self
创建新的 SMTP 邮件提供者
Sourcepub fn build_email(&self, to: &str, subject: &str, body: &str) -> EmailMessage
pub fn build_email(&self, to: &str, subject: &str, body: &str) -> EmailMessage
构建邮件消息
Trait Implementations§
Source§impl EmailProvider for SmtpEmailProvider
impl EmailProvider for SmtpEmailProvider
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,
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,
发送邮件 Read more
Auto Trait Implementations§
impl Freeze for SmtpEmailProvider
impl RefUnwindSafe for SmtpEmailProvider
impl Send for SmtpEmailProvider
impl Sync for SmtpEmailProvider
impl Unpin for SmtpEmailProvider
impl UnsafeUnpin for SmtpEmailProvider
impl UnwindSafe for SmtpEmailProvider
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more