[−][src]Struct lettre::smtp::SmtpTransportBuilder
Contains client configuration
Methods
impl SmtpTransportBuilder
[src]
impl SmtpTransportBuilder
Builder for the SMTP SmtpTransport
pub fn new<A: ToSocketAddrs>(
addr: A,
security: ClientSecurity
) -> Result<SmtpTransportBuilder, Error>
[src]
pub fn new<A: ToSocketAddrs>(
addr: A,
security: ClientSecurity
) -> Result<SmtpTransportBuilder, Error>
Creates a new SMTP client
Defaults are:
- No connection reuse
- No authentication
- No SMTPUTF8 support
- A 60 seconds timeout for smtp commands
pub fn smtp_utf8(self, enabled: bool) -> SmtpTransportBuilder
[src]
pub fn smtp_utf8(self, enabled: bool) -> SmtpTransportBuilder
Enable SMTPUTF8 if the server supports it
pub fn hello_name(self, name: ClientId) -> SmtpTransportBuilder
[src]
pub fn hello_name(self, name: ClientId) -> SmtpTransportBuilder
Set the name used during EHLO
pub fn connection_reuse(
self,
parameters: ConnectionReuseParameters
) -> SmtpTransportBuilder
[src]
pub fn connection_reuse(
self,
parameters: ConnectionReuseParameters
) -> SmtpTransportBuilder
Enable connection reuse
pub fn credentials<S: Into<Credentials>>(
self,
credentials: S
) -> SmtpTransportBuilder
[src]
pub fn credentials<S: Into<Credentials>>(
self,
credentials: S
) -> SmtpTransportBuilder
Set the client credentials
pub fn authentication_mechanism(
self,
mechanism: Mechanism
) -> SmtpTransportBuilder
[src]
pub fn authentication_mechanism(
self,
mechanism: Mechanism
) -> SmtpTransportBuilder
Set the authentication mechanism to use
pub fn timeout(self, timeout: Option<Duration>) -> SmtpTransportBuilder
[src]
pub fn timeout(self, timeout: Option<Duration>) -> SmtpTransportBuilder
Set the timeout duration
pub fn build(self) -> SmtpTransport
[src]
pub fn build(self) -> SmtpTransport
Build the SMTP client
It does not connect to the server, but only creates the SmtpTransport
Auto Trait Implementations
impl Send for SmtpTransportBuilder
impl Send for SmtpTransportBuilder
impl Sync for SmtpTransportBuilder
impl Sync for SmtpTransportBuilder
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
🔬 This is a nightly-only experimental API. (
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
🔬 This is a nightly-only experimental API. (
try_from
)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more
impl<T> Same for T
impl<T> Same for T
type Output = T
Should always be Self