From 3fa33c87d9ba5aecf7c32c4f16d64084a850cccc Mon Sep 17 00:00:00 2001 From: youpie Date: Wed, 19 Feb 2025 23:56:28 +0100 Subject: [PATCH] only apply html for custom bodies --- server/notification-providers/smtp.js | 2 +- src/components/notifications/SMTP.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/notification-providers/smtp.js b/server/notification-providers/smtp.js index 76805f1c2..e7f86f014 100644 --- a/server/notification-providers/smtp.js +++ b/server/notification-providers/smtp.js @@ -53,7 +53,6 @@ class SMTP extends NotificationProvider { // cannot end with whitespace as this often raises spam scores const customSubject = notification.customSubject?.trim() || ""; const customBody = notification.customBody?.trim() || ""; - use_html_body = notification.htmlBody || false const context = this.generateContext(msg, monitorJSON, heartbeatJSON); const engine = new Liquid(); if (customSubject !== "") { @@ -61,6 +60,7 @@ class SMTP extends NotificationProvider { subject = await engine.render(tpl, context); } if (customBody !== "") { + use_html_body = notification.htmlBody || false const tpl = engine.parse(customBody); body = await engine.render(tpl, context); } diff --git a/src/components/notifications/SMTP.vue b/src/components/notifications/SMTP.vue index 3e2da9bce..4da2bd0f0 100644 --- a/src/components/notifications/SMTP.vue +++ b/src/components/notifications/SMTP.vue @@ -93,7 +93,7 @@