From 38504e2d531ed5c08a387e9d3c216074ab7f1fc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Wed, 23 Jun 2021 10:46:51 +0200 Subject: [PATCH] Skip post-table processing for emails --- app/Mail/TemplateEmail.php | 6 +++--- app/Utils/TemplateEngine.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Mail/TemplateEmail.php b/app/Mail/TemplateEmail.php index 4ba7bd5cd12f..a3a9a837fbe1 100644 --- a/app/Mail/TemplateEmail.php +++ b/app/Mail/TemplateEmail.php @@ -63,9 +63,9 @@ class TemplateEmail extends Mailable DesignHelpers::parseMarkdownToHtml($this->build_email->getBody()) ); - $this->build_email->setBody( - TemplateEngine::wrapElementsIntoTables('
', $this->build_email->getBody(), $settings) - ); +// $this->build_email->setBody( +// TemplateEngine::wrapElementsIntoTables('
', $this->build_email->getBody(), $settings) +// ); } $company = $this->client->company; diff --git a/app/Utils/TemplateEngine.php b/app/Utils/TemplateEngine.php index 0b6621b7af05..0045f78c4dc7 100644 --- a/app/Utils/TemplateEngine.php +++ b/app/Utils/TemplateEngine.php @@ -212,7 +212,7 @@ class TemplateEngine } else { $wrapper = ''; } - } + } elseif ($email_style == 'plain') { $wrapper = view($this->getTemplatePath($email_style), $data)->render(); $injection = ''; @@ -226,7 +226,7 @@ class TemplateEngine $data = [ 'subject' => $this->subject, - 'body' => $email_style == 'custom' ? $this->body : self::wrapElementsIntoTables(strtr('
', ['$body' => '']), $this->body, $this->entity_obj->client->getMergedSettings()), + 'body' => $this->body, 'wrapper' => $wrapper, 'raw_body' => $this->raw_body, 'raw_subject' => $this->raw_subject