[−][src]Struct lettre::transport::smtp::SmtpTransportBuilder
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]
self,
mechanism: Mechanism
) -> SmtpTransportBuilder
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
impl RefUnwindSafe for SmtpTransportBuilder
impl Send for SmtpTransportBuilder
impl Sync for SmtpTransportBuilder
impl Unpin for SmtpTransportBuilder
impl UnwindSafe for SmtpTransportBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,