[][src]Enum mail_smtp::error::MailSendError

pub enum MailSendError {
    Mail(MailError),
    Smtp(LogicError),
    Connecting(ConnectingFailed),
    Io(Error),
}

Error used when sending a mail fails.

Failing to encode a mail before sending it also counts as a MailSendError, as it's done "on the fly" when sending a mail.

Variants

Mail(MailError)

Something is wrong with the mail instance (e.g. it can't be encoded).

This can happen for a number of reasons including:

  1. Missing header fields.
  2. Invalid header fields.
  3. Encoding header fields fails.
  4. Loading resources failed (resources like e.g. appendix, logo embedded in html mail, etc.)

Sending the mail failed.

This can happen for a number of reasons including:

  1. Server rejects mail transaction because of send or receiver address or body data (e.g. body to long).
  2. Mail address requires smtputf8 support, which is not given.
  3. Server rejects sending the mail for other reasons (it's closing, overloaded etc.).
Connecting(ConnectingFailed)

Setting up the connection failed.

Failures can include but are not limited to:

  • Connecting with TCP failed.
  • Starting TLS failed.
  • Server does not want to be used (e.g. failure on sending EHLO).
  • Authentication failed.
Io(Error)

An I/O error happened while using the connection.

This is mainly for I/O errors after the setup of the connection was successful, which normally includes sending Ehlo and Auth commands.

Trait Implementations

impl Debug for MailSendError[src]

impl Display for MailSendError[src]

impl Fail for MailSendError[src]

impl From<ConnectingFailed> for MailSendError[src]

impl From<Error> for MailSendError[src]

impl From<GeneralError> for MailSendError[src]

impl From<LogicError> for MailSendError[src]

impl From<MailError> for MailSendError[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> AsFail for T where
    T: Fail
[src]

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

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

impl<T> Erased for T

impl<E> Fail for E where
    E: 'static + Error + Send + Sync
[src]

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

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

impl<F, T> HeaderTryInto<T> for F where
    T: HeaderTryFrom<F>, 
[src]

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

impl<T> ToString for T where
    T: Display + ?Sized
[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.