Skip to content

Commit

Permalink
fix(smtp): Add verbose log of email recipients
Browse files Browse the repository at this point in the history
...
  • Loading branch information
Göran Sander committed Feb 1, 2024
1 parent 9037246 commit 8d4ad93
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/lib/smtp.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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;
}
Expand Down

0 comments on commit 8d4ad93

Please sign in to comment.