1
0
Fork 0
mirror of https://github.com/dani-garcia/vaultwarden.git synced 2025-05-20 10:33:55 +00:00

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

This commit is contained in:
Daniel García 2019-03-10 14:44:42 +01:00
parent b4244b28b6
commit e93538cea9
No known key found for this signature in database
GPG key ID: FC8A7D14C3CD543A
2 changed files with 10 additions and 2 deletions

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
};