mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-09-10 10:45:57 +03:00
Add option to use wrapped TLS in email, instead of STARTTLS upgrade
This commit is contained in:
@@ -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
|
||||
};
|
||||
|
Reference in New Issue
Block a user