rok-mail 0.6.0

Email support for the rok ecosystem — Mailable trait, log/SMTP drivers
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use thiserror::Error;

#[derive(Debug, Error)]
pub enum MailError {
    #[error("mail not configured — add MailLayer to your router")]
    NotConfigured,
    #[error("unknown mail driver '{0}' — supported: log, smtp, postmark, resend")]
    UnknownDriver(String),
    #[error("SMTP driver requires MAIL_SMTP_HOST to be set")]
    MissingSmtpHost,
    #[error("SMTP error: {0}")]
    Smtp(String),
    #[error("HTTP request failed: {0}")]
    Http(String),
    #[error("missing API key for driver '{0}'")]
    MissingApiKey(String),
}