diff --git a/app/Mail/Engine/PaymentEmailEngine.php b/app/Mail/Engine/PaymentEmailEngine.php index cac95765180f..25a8ae6cb430 100644 --- a/app/Mail/Engine/PaymentEmailEngine.php +++ b/app/Mail/Engine/PaymentEmailEngine.php @@ -33,7 +33,7 @@ class PaymentEmailEngine extends BaseEmailEngine public $contact; private $helpers; - + public function __construct($payment, $contact, $template_data = null) { $this->payment = $payment; @@ -169,7 +169,7 @@ class PaymentEmailEngine extends BaseEmailEngine $data['$company3'] = ['value' => $this->helpers->formatCustomFieldValue($this->company->custom_fields, 'company3', $this->settings->custom_value3, $this->client) ?: ' ', 'label' => $this->helpers->makeCustomField($this->company->custom_fields, 'company3')]; $data['$company4'] = ['value' => $this->helpers->formatCustomFieldValue($this->company->custom_fields, 'company4', $this->settings->custom_value4, $this->client) ?: ' ', 'label' => $this->helpers->makeCustomField($this->company->custom_fields, 'company4')]; - $data['$view_link'] = ['value' => ''.ctrans('texts.view_payment').'', 'label' => ctrans('texts.view_payment')]; + $data['$view_link'] = ['value' => ''.ctrans('texts.view_payment').'', 'label' => ctrans('texts.view_payment')]; $data['$view_url'] = ['value' => $this->payment->getLink(), 'label' => ctrans('texts.view_payment')]; $data['$invoices'] = ['value' => $this->formatInvoices(), 'label' => ctrans('texts.invoices')]; diff --git a/app/Utils/TemplateEngine.php b/app/Utils/TemplateEngine.php index 49b77217b171..33ee07c3c212 100644 --- a/app/Utils/TemplateEngine.php +++ b/app/Utils/TemplateEngine.php @@ -127,7 +127,7 @@ class TemplateEngine $this->body = EmailTemplateDefaults::getDefaultTemplate($this->template, $this->settings_entity->locale()); } } - + return $this; } @@ -276,7 +276,7 @@ class TemplateEngine $documents['wrapper']->saveHTML(); $documents['body'] = new \DOMDocument(); - $documents['body']->loadHTML(empty($body) ? '
' : (new CssToInlineStyles())->convert($body, $styles)); + $documents['body']->loadHTML(empty($body) ? '
' : mb_convert_encoding((new CssToInlineStyles())->convert($body, $styles), 'HTML-ENTITIES', 'UTF-8')); $table_html ='