Struct lettre::smtp::client::InnerClient[][src]

pub struct InnerClient<S: Write + Read = NetworkStream> { /* fields omitted */ }
Expand description

Structure that implements the SMTP client

Implementations

impl<S: Write + Read> InnerClient<S>[src]

pub fn new() -> InnerClient<S>[src]

Creates a new SMTP client

It does not connects to the server, but only creates the Client

impl<S: Connector + Write + Read + Timeout + Debug> InnerClient<S>[src]

pub fn close(&mut self)[src]

Closes the SMTP transaction if possible

pub fn set_stream(&mut self, stream: S)[src]

Sets the underlying stream

pub fn upgrade_tls_stream(
    &mut self,
    tls_parameters: &ClientTlsParameters
) -> Result<()>
[src]

Upgrades the underlying connection to SSL/TLS

pub fn is_encrypted(&self) -> bool[src]

Tells if the underlying stream is currently encrypted

pub fn set_timeout(&mut self, duration: Option<Duration>) -> Result<()>[src]

Set timeout

pub fn connect<A: ToSocketAddrs>(
    &mut self,
    addr: &A,
    tls_parameters: Option<&ClientTlsParameters>
) -> SmtpResult
[src]

Connects to the configured server

pub fn is_connected(&mut self) -> bool[src]

Checks if the server is connected using the NOOP SMTP command

pub fn auth(
    &mut self,
    mechanism: Mechanism,
    credentials: &Credentials
) -> SmtpResult
[src]

Sends an AUTH command with the given mechanism, and handles challenge if needed

pub fn message(&mut self, message: Box<dyn Read>) -> SmtpResult[src]

Sends the message content

pub fn command<C: Display>(&mut self, command: C) -> SmtpResult[src]

Sends an SMTP command

Trait Implementations

impl<S: Debug + Write + Read> Debug for InnerClient<S>[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<S: Default + Write + Read> Default for InnerClient<S>[src]

fn default() -> InnerClient<S>[src]

Returns the “default value” for a type. Read more

Auto Trait Implementations

impl<S> RefUnwindSafe for InnerClient<S> where
    S: RefUnwindSafe

impl<S> Send for InnerClient<S> where
    S: Send

impl<S> Sync for InnerClient<S> where
    S: Sync

impl<S> Unpin for InnerClient<S> where
    S: Unpin

impl<S> UnwindSafe for InnerClient<S> where
    S: UnwindSafe

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.