pub struct SmtpClient { /* private fields */ }
Expand description

Contains client configuration

Implementations

Builder for the SMTP SmtpTransport

Creates a new SMTP client

Defaults are:

  • No connection reuse
  • No authentication
  • No SMTPUTF8 support
  • A 60 seconds timeout for smtp commands

Consider using [SmtpClient::new_simple] instead, if possible.

Simple and secure transport, should be used when possible. Creates an encrypted transport over submissions port, using the provided domain to validate TLS certificates.

Creates a new local SMTP client to port 25

Enable SMTPUTF8 if the server supports it

Set the name used during EHLO

Enable connection reuse

Set the ConnectionType

Set the client credentials

Set the authentication mechanism to use

Set if the set authentication mechanism should be force

Set the timeout duration

Build the SMTP client

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

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.