diff --git a/src/config.rs b/src/config.rs index 6962035..748c394 100644 --- a/src/config.rs +++ b/src/config.rs @@ -345,6 +345,8 @@ make_config! { smtp_username: String, true, option; /// Password smtp_password: Pass, true, option; + /// Accept invalid certificates + smtp_ssl_insecure: bool, true, def, false; }, } diff --git a/src/mail.rs b/src/mail.rs index c729efa..2a5805e 100644 --- a/src/mail.rs +++ b/src/mail.rs @@ -18,6 +18,7 @@ fn mailer() -> SmtpTransport { let client_security = if CONFIG.smtp_ssl() { let tls = TlsConnector::builder() .min_protocol_version(Some(Protocol::Tlsv11)) + .danger_accept_invalid_certs(CONFIG.smtp_ssl_insecure()) .build() .unwrap();