mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-23 01:41:01 +00:00
Co-authored-by: Manuel Bleichner <manuel.bleichner@bvu.de>
This commit is contained in:
parent
40ff77eee2
commit
c0b7865896
1 changed files with 3 additions and 5 deletions
|
@ -68,12 +68,10 @@ pub async fn send_email(
|
|||
// is bad.
|
||||
|
||||
// Set the TLS
|
||||
let builder_dangerous = AsyncSmtpTransport::builder_dangerous(smtp_server).port(smtp_port);
|
||||
|
||||
let mut builder = match email_config.tls_type.as_str() {
|
||||
"starttls" => AsyncSmtpTransport::starttls_relay(smtp_server)?,
|
||||
"tls" => AsyncSmtpTransport::relay(smtp_server)?,
|
||||
_ => builder_dangerous,
|
||||
"starttls" => AsyncSmtpTransport::starttls_relay(smtp_server)?.port(smtp_port),
|
||||
"tls" => AsyncSmtpTransport::relay(smtp_server)?.port(smtp_port),
|
||||
_ => AsyncSmtpTransport::builder_dangerous(smtp_server).port(smtp_port),
|
||||
};
|
||||
|
||||
// Set the creds if they exist
|
||||
|
|
Loading…
Reference in a new issue