Add validation when the from is not a email or is not teh same email that the account

This commit is contained in:
Julio Cesar Laura
2012-09-20 14:25:35 -04:00
parent b765051bbe
commit f8e4112b4e

View File

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