[][src]Struct lettre::transport::smtp::SmtpTransportBuilder

pub struct SmtpTransportBuilder { /* fields omitted */ }

Contains client configuration

Implementations

impl SmtpTransportBuilder[src]

Builder for the SMTP SmtpTransport

pub fn new<A: ToSocketAddrs>(addr: A) -> Result<SmtpTransportBuilder, Error>[src]

Creates a new local SMTP client

pub fn localhost() -> Result<SmtpTransportBuilder, Error>[src]

Creates a new local SMTP client to port 25

pub fn ssl_context(self, ssl_context: SslContext) -> SmtpTransportBuilder[src]

Use STARTTLS with a specific context

pub fn security_level(self, level: SecurityLevel) -> SmtpTransportBuilder[src]

Set the security level for SSL/TLS

pub fn encrypt(self) -> SmtpTransportBuilder[src]

Require SSL/TLS using STARTTLS

Incompatible with `ssl_wrapper()``

pub fn ssl_wrapper(self) -> SmtpTransportBuilder[src]

Require SSL/TLS using SMTPS

Incompatible with encrypt()

pub fn smtp_utf8(self, enabled: bool) -> SmtpTransportBuilder[src]

Enable SMTPUTF8 if the server supports it

pub fn hello_name(self, name: &str) -> SmtpTransportBuilder[src]

Set the name used during HELO or EHLO

pub fn connection_reuse(self, enable: bool) -> SmtpTransportBuilder[src]

Enable connection reuse

pub fn connection_reuse_count_limit(self, limit: u16) -> SmtpTransportBuilder[src]

Set the maximum number of emails sent using one connection

pub fn credentials(self, username: &str, password: &str) -> SmtpTransportBuilder[src]

Set the client credentials

pub fn authentication_mechanism(
    self,
    mechanism: Mechanism
) -> SmtpTransportBuilder
[src]

Set the authentication mechanisms

pub fn build(self) -> SmtpTransport[src]

Build the SMTP client

It does not connect to the server, but only creates the SmtpTransport

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,