rok-mail 0.6.0

Email support for the rok ecosystem — Mailable trait, log/SMTP drivers
Documentation
use rok_core::rok_exception;

rok_exception! {
    /// Transport-level failure (SMTP unreachable, credentials rejected, …).
    pub struct E_MAIL_TRANSPORT_ERROR {
        status = 500,
        self_handled = true,
        fields: { pub source: String }
    }
}

rok_exception! {
    /// The mailer accepted the message but sending ultimately failed.
    pub struct E_SEND_FAILED {
        status = 500,
        self_handled = true,
        fields: { pub recipient: String }
    }
}

rok_exception! {
    /// Mail configuration is incomplete or invalid.
    pub struct E_INVALID_MAILER_CONFIG {
        status = 500,
        self_handled = false,
        fields: { pub detail: String }
    }
}

rok_exception! {
    /// Raised when `Mail::send()` is called outside a request context without an explicit config.
    pub struct E_MAIL_NOT_CONFIGURED {
        status = 500,
        self_handled = false,
        fields: {
        }
    }
}