diff --git a/htdocs/core/class/smtps.class.php b/htdocs/core/class/smtps.class.php
index f80d2f1547a..df7647b330c 100644
--- a/htdocs/core/class/smtps.class.php
+++ b/htdocs/core/class/smtps.class.php
@@ -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("/
]*>/", " ", $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('/