Struct async_mailer::SmtpMailer
source · pub struct SmtpMailer { /* private fields */ }Expand description
An SMTP mailer client, implementing the async_mailer::Mailer trait to be used as runtime-pluggable trait object.
An abstraction over mail_send, sending mail via an SMTP connection.
Self-signed certificates can optionally be accepted, to use the SMTP mailer in development while using the Outlook mailer in production.
Implementations§
source§impl SmtpMailer
impl SmtpMailer
sourcepub fn new(
host: String,
port: u16,
invalid_certs: SmtpInvalidCertsPolicy,
user: String,
password: Secret<String>
) -> SmtpMailer
pub fn new( host: String, port: u16, invalid_certs: SmtpInvalidCertsPolicy, user: String, password: Secret<String> ) -> SmtpMailer
Create a new SMTP mailer client.
Trait Implementations§
source§impl Clone for SmtpMailer
impl Clone for SmtpMailer
source§fn clone(&self) -> SmtpMailer
fn clone(&self) -> SmtpMailer
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for SmtpMailer
impl Debug for SmtpMailer
source§impl Mailer for SmtpMailer
impl Mailer for SmtpMailer
source§fn send_mail<'life0, 'life1, 'async_trait>(
&'life0 self,
message: Message<'life1>
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Sync + Send + 'static, Global>>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
SmtpMailer: 'async_trait,
fn send_mail<'life0, 'life1, 'async_trait>( &'life0 self, message: Message<'life1> ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Sync + Send + 'static, Global>>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, SmtpMailer: 'async_trait,
Send the prepared MIME message via an SMTP connection.
Auto Trait Implementations§
impl !RefUnwindSafe for SmtpMailer
impl Send for SmtpMailer
impl Sync for SmtpMailer
impl Unpin for SmtpMailer
impl !UnwindSafe for SmtpMailer
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