Struct lettre::transport::smtp::SmtpTransportBuilder
source · pub struct SmtpTransportBuilder { /* private fields */ }
Available on crate feature
smtp-transport
only.Expand description
Contains client configuration.
Instances of this struct can be created using functions of SmtpTransport
.
Implementations§
source§impl SmtpTransportBuilder
impl SmtpTransportBuilder
Builder for the SMTP SmtpTransport
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 native-tls
or rustls-tls
or boring-tls
only.
pub fn tls(self, tls: Tls) -> Self
native-tls
or rustls-tls
or boring-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(self) -> SmtpTransport
pub fn build(self) -> SmtpTransport
Build the transport
If the pool
feature is enabled, an Arc
wrapped pool is created.
Defaults can be found at PoolConfig
Trait Implementations§
source§impl Clone for SmtpTransportBuilder
impl Clone for SmtpTransportBuilder
source§fn clone(&self) -> SmtpTransportBuilder
fn clone(&self) -> SmtpTransportBuilder
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 SmtpTransportBuilder
impl !RefUnwindSafe for SmtpTransportBuilder
impl Send for SmtpTransportBuilder
impl Sync for SmtpTransportBuilder
impl Unpin for SmtpTransportBuilder
impl !UnwindSafe for SmtpTransportBuilder
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