Upgrade to 3.1.2

This commit is contained in:
Bastian Allgeier
2019-04-09 14:34:12 +02:00
parent 852a14595e
commit eb29ef6d6c
58 changed files with 535 additions and 258 deletions

View File

@@ -75,12 +75,16 @@ class Email
$html = $this->getTemplate($this->props['template'], 'html');
$text = $this->getTemplate($this->props['template'], 'text');
if ($html->exists() && $text->exists()) {
if ($html->exists()) {
$this->props['body'] = [
'html' => $html->render($data),
'text' => $text->render($data),
'html' => $html->render($data)
];
// fallback to single email text template
if ($text->exists()) {
$this->props['body']['text'] = $text->render($data);
}
// fallback to single email text template
} elseif ($text->exists()) {
$this->props['body'] = $text->render($data);
} else {