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