From a17d855ee565cf7f987c32c5ac7d131f1a8fb4a9 Mon Sep 17 00:00:00 2001 From: mic Date: Wed, 23 Apr 2025 18:24:09 +0200 Subject: [PATCH] fix: ensure HTML body is generated from plain text if no parts are available --- js/mzta-utils.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/mzta-utils.js b/js/mzta-utils.js index e02e6070..b3d786c4 100644 --- a/js/mzta-utils.js +++ b/js/mzta-utils.js @@ -143,6 +143,9 @@ export function getMailBody(fullMessage){ html += part.body; } } + if(html === "") { + html = text.replace(/\n/g, "
"); + } return {text, html}; }