Skip to content

Commit

Permalink
Merge pull request #9070 from kinglozzer/email-plaintext
Browse files Browse the repository at this point in the history
FIX: Email::render() generating object instead of string for plaintext part (fixes #9069)
  • Loading branch information
robbieaverill authored Jul 2, 2019
2 parents fd88003 + 8e87264 commit ad05099
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Control/Email/Email.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -809,7 +809,7 @@ public function render($plainOnly = false)
$htmlPartObject = DBField::create_field('HTMLFragment', $htmlPart);
$plainPart = $htmlPartObject->Plain();
}

// Rendering is finished
Requirements::restore();

Expand Down

0 comments on commit ad05099

Please sign in to comment.