From e261a27ebec3083ea51af579b8782572fef4223a Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Thu, 28 Oct 2021 11:10:09 +0800 Subject: [PATCH] fix wrong call of rejectUnauthorized for smtp (#757) --- server/notification-providers/smtp.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/notification-providers/smtp.js b/server/notification-providers/smtp.js index 60068eb7..14429bca 100644 --- a/server/notification-providers/smtp.js +++ b/server/notification-providers/smtp.js @@ -12,6 +12,9 @@ class SMTP extends NotificationProvider { host: notification.smtpHost, port: notification.smtpPort, secure: notification.smtpSecure, + tls: { + rejectUnauthorized: notification.smtpIgnoreTLSError || false, + }, }; // Should fix the issue in https://github.com/louislam/uptime-kuma/issues/26#issuecomment-896373904 @@ -87,9 +90,6 @@ class SMTP extends NotificationProvider { to: notification.smtpTo, subject: subject, text: bodyTextContent, - tls: { - rejectUnauthorized: notification.smtpIgnoreTLSError || false, - }, }); return "Sent Successfully.";