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:
parent
b4244b28b6
commit
e93538cea9
2 changed files with 10 additions and 2 deletions
|
@ -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
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue