From 272b9702fbc124fe8e41ca50527ff8d6d66ad6bb Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Tue, 20 Jan 2026 00:25:36 +0100 Subject: [PATCH] Apply suggestion from @CommanderStorm --- server/notification-providers/smtp.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/server/notification-providers/smtp.js b/server/notification-providers/smtp.js index ebb8081bf..2fd717b5d 100644 --- a/server/notification-providers/smtp.js +++ b/server/notification-providers/smtp.js @@ -18,12 +18,7 @@ class SMTP extends NotificationProvider { }; // Handle TLS/STARTTLS options - if (notification.smtpSecure) { - // SMTPS (implicit TLS on port 465) - config.tls = { - rejectUnauthorized: !notification.smtpIgnoreTLSError || false, - }; - } else if (notification.smtpIgnoreSTARTTLS) { + if (!notification.smtpSecure && notification.smtpIgnoreSTARTTLS) { // Disable STARTTLS completely for servers that don't support it // Connection will remain unencrypted log.warn( @@ -32,7 +27,8 @@ class SMTP extends NotificationProvider { ); config.ignoreTLS = true; } else { - // Allow STARTTLS (default behavior for ports 25, 587) + // SMTPS (implicit TLS on port 465) + // or STARTTLS (default behavior for ports 25, 587) config.tls = { rejectUnauthorized: !notification.smtpIgnoreTLSError || false, };