Struct lettre::SmtpTransport[][src]

pub struct SmtpTransport { /* fields omitted */ }

Transport using the SMTP protocol

Implementations

impl SmtpTransport[src]

pub fn relay(relay: &str) -> Result<SmtpTransportBuilder, Error>[src]

This is supported on crate feature smtp-transport only.

Simple and secure transport, using TLS connections to communicate with the SMTP server

The right option for most SMTP servers.

Creates an encrypted transport over submissions port, using the provided domain to validate TLS certificates.

pub fn starttls_relay(relay: &str) -> Result<SmtpTransportBuilder, Error>[src]

This is supported on crate feature smtp-transport only.

Simple an secure transport, using STARTTLS to obtain encrypted connections

Alternative to SmtpTransport::relay, for SMTP servers that don’t take SMTPS connections.

Creates an encrypted transport over submissions port, by first connecting using an unencrypted connection and then upgrading it with STARTTLS. The provided domain is used to validate TLS certificates.

An error is returned if the connection can’t be upgraded. No credentials or emails will be sent to the server, protecting from downgrade attacks.

pub fn unencrypted_localhost() -> SmtpTransport[src]

This is supported on crate feature smtp-transport only.

Creates a new local SMTP client to port 25

Shortcut for local unencrypted relay (typical local email daemon that will handle relaying)

pub fn builder_dangerous<T: Into<String>>(server: T) -> SmtpTransportBuilder[src]

This is supported on crate feature smtp-transport only.

Creates a new SMTP client

Defaults are:

  • No authentication
  • No TLS
  • A 60 seconds timeout for smtp commands
  • Port 25

Consider using SmtpTransport::relay or SmtpTransport::starttls_relay instead, if possible.

Trait Implementations

impl Clone for SmtpTransport[src]

This is supported on crate feature smtp-transport only.

impl Transport for SmtpTransport[src]

This is supported on crate feature smtp-transport only.

type Ok = Response

Response produced by the Transport

type Error = Error

Error produced by the Transport

fn send_raw(
    &self,
    envelope: &Envelope,
    email: &[u8]
) -> Result<Self::Ok, Self::Error>
[src]

Sends an email

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> Conv for T

impl<T> Conv for T

impl<T> FmtForward for T

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

impl<T> Instrument for T[src]

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

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

impl<T> TryConv for T

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>,