mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #9070 from kinglozzer/email-plaintext
FIX: Email::render() generating object instead of string for plaintext part (fixes #9069)
This commit is contained in:
commit
ad050997fd
@ -792,10 +792,10 @@ class Email extends ViewableData
|
||||
|
||||
// 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 @@ class Email extends ViewableData
|
||||
$htmlPartObject = DBField::create_field('HTMLFragment', $htmlPart);
|
||||
$plainPart = $htmlPartObject->Plain();
|
||||
}
|
||||
|
||||
|
||||
// Rendering is finished
|
||||
Requirements::restore();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user