Struct lettre::smtp::SmtpTransportBuilder
[−]
[src]
pub struct SmtpTransportBuilder { /* fields omitted */ }
Contains client configuration
Methods
impl SmtpTransportBuilder
[src]
Builder for the SMTP SmtpTransport
pub fn new<A: ToSocketAddrs>(
addr: A,
security: ClientSecurity
) -> Result<SmtpTransportBuilder, Error>
[src]
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]
Enable SMTPUTF8 if the server supports it
pub fn hello_name(self, name: ClientId) -> SmtpTransportBuilder
[src]
Set the name used during EHLO
pub fn connection_reuse(
self,
parameters: ConnectionReuseParameters
) -> SmtpTransportBuilder
[src]
self,
parameters: ConnectionReuseParameters
) -> SmtpTransportBuilder
Enable connection reuse
pub fn credentials<S: Into<Credentials>>(
self,
credentials: S
) -> SmtpTransportBuilder
[src]
self,
credentials: S
) -> SmtpTransportBuilder
Set the client credentials
pub fn authentication_mechanism(
self,
mechanism: Mechanism
) -> SmtpTransportBuilder
[src]
self,
mechanism: Mechanism
) -> SmtpTransportBuilder
Set the authentication mechanism to use
pub fn timeout(self, timeout: Option<Duration>) -> SmtpTransportBuilder
[src]
Set the timeout duration
pub fn build(self) -> SmtpTransport
[src]
Build the SMTP client
It does not connect to the server, but only creates the SmtpTransport