Skip to content
Snippets Groups Projects
Unverified Commit c0b78658 authored by Manuel Bleichner's avatar Manuel Bleichner Committed by GitHub
Browse files

Fix wrong SMTP port when TLS is being used (fixes #3574) (#3607)

parent 40ff77ee
No related branches found
No related tags found
No related merge requests found
...@@ -68,12 +68,10 @@ pub async fn send_email( ...@@ -68,12 +68,10 @@ pub async fn send_email(
// is bad. // is bad.
// Set the TLS // Set the TLS
let builder_dangerous = AsyncSmtpTransport::builder_dangerous(smtp_server).port(smtp_port);
let mut builder = match email_config.tls_type.as_str() { let mut builder = match email_config.tls_type.as_str() {
"starttls" => AsyncSmtpTransport::starttls_relay(smtp_server)?, "starttls" => AsyncSmtpTransport::starttls_relay(smtp_server)?.port(smtp_port),
"tls" => AsyncSmtpTransport::relay(smtp_server)?, "tls" => AsyncSmtpTransport::relay(smtp_server)?.port(smtp_port),
_ => builder_dangerous, _ => AsyncSmtpTransport::builder_dangerous(smtp_server).port(smtp_port),
}; };
// Set the creds if they exist // Set the creds if they exist
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment