Add option to use wrapped TLS in email, instead of STARTTLS upgrade

This commit is contained in:
Daniel García committed 2019-03-10 14:45:42 +01:00
1 parent b4244b28b6
commit e93538cea9
2 files changed
+10 -2

No files matched your search

+7 -1
View File
@@ -18,7 +18,13 @@ fn mailer() -> SmtpTransport {
.build()
.unwrap();
ClientSecurity::Required(ClientTlsParameters::new(host.clone(), tls))
let params = ClientTlsParameters::new(host.clone(), tls);
if CONFIG.smtp_explicit_tls() {
ClientSecurity::Wrapper(params)
} else {
ClientSecurity::Required(params)
}
} else {
ClientSecurity::None
};