From 8d4ad9308f44c876d2ecb335ee84448a99ae0d57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B6ran=20Sander?= Date: Thu, 1 Feb 2024 18:06:40 +0000 Subject: [PATCH] fix(smtp): Add verbose log of email recipients ... --- src/lib/smtp.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/lib/smtp.js b/src/lib/smtp.js index b33cc4e7..3e99933e 100644 --- a/src/lib/smtp.js +++ b/src/lib/smtp.js @@ -481,7 +481,7 @@ export async function sendReloadTaskFailureNotificationEmail(reloadParams) { // Does the main sendlist contain any email addresses? Warn if not if (mainSendList?.length === 0) { globals.logger.warn( - `EMAIL RELOAD TASK FAILED ALERT: No email addresses defined for alert email to app "${reloadParams.appName}", ID=${reloadParams.appId}` + `EMAIL RELOAD TASK FAILED ALERT: No email addresses defined for app owner's alert email for app "${reloadParams.appName}", ID=${reloadParams.appId}` ); } } else { @@ -494,6 +494,15 @@ export async function sendReloadTaskFailureNotificationEmail(reloadParams) { // Make sure send list does not contain any duplicate email addresses const mainSendListUnique = [...new Set(mainSendList)]; + // Debug + globals.logger.verbose( + `EMAIL RELOAD TASK FAILED ALERT: Final send list for failed task "${reloadParams.taskName}": ${JSON.stringify( + mainSendListUnique, + null, + 2 + )}` + ); + if (isSmtpConfigOk() === false) { return 1; }