FIX text version of html emailing (removed the body style)

This commit is contained in:
Laurent Destailleur 2020-04-21 11:19:27 +02:00
parent b8e68a5ef7
commit ff5bf040e8

View File

@ -1379,9 +1379,10 @@ class SMTPs
$strContentAltText = '';
if ($strType == 'html')
{
// Similar code to forge a text from html is also in CMailFile.class.php
$strContentAltText = preg_replace("/<br\s*[^>]*>/", " ", $strContent);
$strContentAltText = html_entity_decode(strip_tags($strContentAltText));
// Similar code to forge a text from html is also in CMailFile.class.php
$strContentAltText = preg_replace('/<head><title>.*<\/style><\/head>/', '', $strContent);
$strContentAltText = preg_replace("/<br\s*[^>]*>/", " ", $strContentAltText);
$strContentAltText = html_entity_decode(strip_tags($strContentAltText));
$strContentAltText = trim(wordwrap($strContentAltText, 75, "\r\n"));
}