diff --git a/src/Control/Email/Email.php b/src/Control/Email/Email.php index 8d79db7097e..c343fade478 100644 --- a/src/Control/Email/Email.php +++ b/src/Control/Email/Email.php @@ -792,10 +792,10 @@ public function render($plainOnly = false) // Do not interfere with emails styles Requirements::clear(); - + // Render plain part if ($plainTemplate && !$plainPart) { - $plainPart = $this->renderWith($plainTemplate, $this->getData()); + $plainPart = $this->renderWith($plainTemplate, $this->getData())->Plain(); } // Render HTML part, either if sending html email, or a plain part is lacking @@ -809,7 +809,7 @@ public function render($plainOnly = false) $htmlPartObject = DBField::create_field('HTMLFragment', $htmlPart); $plainPart = $htmlPartObject->Plain(); } - + // Rendering is finished Requirements::restore();