From c3f64ed36edd17f89a27969b607b59a7317dce9d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 18 Jun 2018 23:18:22 +0200 Subject: [PATCH] FIX better text content for multipart email --- htdocs/core/class/CMailFile.class.php | 2 ++ htdocs/core/class/smtps.class.php | 2 ++ htdocs/langs/en_US/other.lang | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index f4bbe992590..51659416e30 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -1061,7 +1061,9 @@ class CMailFile $strContentAltText = ''; if ($this->msgishtml) { + // Similar code to forge a text from html is also in CMailFile.class.php $strContentAltText = html_entity_decode(strip_tags($strContent)); + $strContentAltText = preg_replace("/]*>/"," ", $strContentAltText); $strContentAltText = rtrim(wordwrap($strContentAltText, 75, empty($conf->global->MAIN_FIX_FOR_BUGGED_MTA)?"\r\n":"\n")); // Check if html header already in message, if not complete the message diff --git a/htdocs/core/class/smtps.class.php b/htdocs/core/class/smtps.class.php index 5eafb29d330..076e307263f 100644 --- a/htdocs/core/class/smtps.class.php +++ b/htdocs/core/class/smtps.class.php @@ -1360,7 +1360,9 @@ class SMTPs $strContentAltText = ''; if ($strType == 'html') { + // Similar code to forge a text from html is also in CMailFile.class.php $strContentAltText = html_entity_decode(strip_tags($strContent)); + $strContentAltText = preg_replace("/]*>/"," ", $strContentAltText); $strContentAltText = rtrim(wordwrap($strContentAltText, 75, "\r\n")); } diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index 13907ca380e..fa98516c989 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -218,7 +218,7 @@ FileIsTooBig=Files is too big PleaseBePatient=Please be patient... NewPassword=New password ResetPassword=Reset password -RequestToResetPasswordReceived=A request to change your password has been received +RequestToResetPasswordReceived=A request to change your password has been received. NewKeyIs=This is your new keys to login NewKeyWillBe=Your new key to login to software will be ClickHereToGoTo=Click here to go to %s