diff --git a/app/Utils/TemplateEngine.php b/app/Utils/TemplateEngine.php index d207bdaaf736..f335d7604b46 100644 --- a/app/Utils/TemplateEngine.php +++ b/app/Utils/TemplateEngine.php @@ -183,10 +183,6 @@ class TemplateEngine if ($email_style !== 'custom') { $this->body = DesignHelpers::parseMarkdownToHtml($this->body); } - - if ($email_style == 'custom') { - - } } private function renderTemplate() @@ -220,13 +216,9 @@ class TemplateEngine $wrapper = str_replace('
', $injection, $wrapper); } -// $body = $email_style == 'custom' -// ? $this->body -// : self::wrapElementsIntoTables(strtr($wrapper, ['$body' => '']), $this->body, $this->entity_obj->client->getMergedSettings()); - $data = [ 'subject' => $this->subject, - 'body' => $this->body, + 'body' => $email_style == 'custom' ? $this->body : self::wrapElementsIntoTables(strtr('', ['$body' => '']), $this->body, $this->entity_obj->client->getMergedSettings()), 'wrapper' => $wrapper, 'raw_body' => $this->raw_body, 'raw_subject' => $this->raw_subject @@ -283,7 +275,7 @@ class TemplateEngine public static function wrapElementsIntoTables(string $wrapper, string $body, $settings): ?string { $documents['wrapper'] = new \DOMDocument(); - $documents['wrapper']->loadHTML($wrapper); + @$documents['wrapper']->loadHTML($wrapper); $documents['master'] = new \DOMDocument(); diff --git a/resources/views/email/template/master.blade.php b/resources/views/email/template/master.blade.php index 93b15102580c..8bbcde4d83ac 100644 --- a/resources/views/email/template/master.blade.php +++ b/resources/views/email/template/master.blade.php @@ -224,11 +224,15 @@