Improvement in the construction of the parameter "From" for the emails

This commit is contained in:
Julio Cesar Laura
2012-09-26 19:12:15 -04:00
parent bde5482461
commit d09b6d73ef
4 changed files with 48 additions and 26 deletions

View File

@@ -791,7 +791,7 @@ class wsBase
$sBody = G::replaceDataField( $templateContents, $Fields);
$hasEmailFrom = preg_match('/(.+)@(.+)\.(.+)/', $sFrom, $match);
if (!$hasEmailFrom || strtolower($sFrom) != strtolower($aSetup['MESS_ACCOUNT'])) {
if (!$hasEmailFrom || strpos($sFrom, $aSetup['MESS_ACCOUNT']) === false) {
$sFrom = '"' . stripslashes($sFrom) . '" <' . $aSetup['MESS_ACCOUNT'] . ">";
}