diff --git a/lib/private/Mail/EMailTemplate.php b/lib/private/Mail/EMailTemplate.php index 05a884a67fa64..b3654f303824a 100644 --- a/lib/private/Mail/EMailTemplate.php +++ b/lib/private/Mail/EMailTemplate.php @@ -435,6 +435,7 @@ public function addBodyText(string $text, $plainText = '') { $text = htmlspecialchars($text); } + $this->ensureBodyListClosed(); $this->ensureBodyIsOpened(); $this->htmlBody .= vsprintf($this->bodyText, [$text]);