Struct lettre::transport::smtp::AsyncSmtpTransportBuilder
source · pub struct AsyncSmtpTransportBuilder { /* private fields */ }
Available on crate feature
smtp-transport
only.Expand description
Contains client configuration.
Instances of this struct can be created using functions of AsyncSmtpTransport
.
Implementations§
source§impl AsyncSmtpTransportBuilder
impl AsyncSmtpTransportBuilder
Builder for the SMTP AsyncSmtpTransport
sourcepub fn hello_name(self, name: ClientId) -> Self
pub fn hello_name(self, name: ClientId) -> Self
Set the name used during EHLO
sourcepub fn credentials(self, credentials: Credentials) -> Self
pub fn credentials(self, credentials: Credentials) -> Self
Set the authentication mechanism to use
sourcepub fn authentication(self, mechanisms: Vec<Mechanism>) -> Self
pub fn authentication(self, mechanisms: Vec<Mechanism>) -> Self
Set the authentication mechanism to use
sourcepub fn tls(self, tls: Tls) -> Self
Available on crate features tokio1-native-tls
or tokio1-rustls-tls
or async-std1-rustls-tls
only.
pub fn tls(self, tls: Tls) -> Self
tokio1-native-tls
or tokio1-rustls-tls
or async-std1-rustls-tls
only.Set the TLS settings to use
sourcepub fn pool_config(self, pool_config: PoolConfig) -> Self
Available on crate feature pool
only.
pub fn pool_config(self, pool_config: PoolConfig) -> Self
pool
only.Use a custom configuration for the connection pool
Defaults can be found at PoolConfig
sourcepub fn build<E>(self) -> AsyncSmtpTransport<E>where
E: Executor,
pub fn build<E>(self) -> AsyncSmtpTransport<E>where
E: Executor,
Build the transport
Trait Implementations§
source§impl Clone for AsyncSmtpTransportBuilder
impl Clone for AsyncSmtpTransportBuilder
source§fn clone(&self) -> AsyncSmtpTransportBuilder
fn clone(&self) -> AsyncSmtpTransportBuilder
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 moreAuto Trait Implementations§
impl Freeze for AsyncSmtpTransportBuilder
impl !RefUnwindSafe for AsyncSmtpTransportBuilder
impl Send for AsyncSmtpTransportBuilder
impl Sync for AsyncSmtpTransportBuilder
impl Unpin for AsyncSmtpTransportBuilder
impl !UnwindSafe for AsyncSmtpTransportBuilder
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