Merge pull request #580 from julceslauhub/master

Add validation when the from is not a email or is not teh same email that the account
This commit is contained in:
julceslauhub
2012-09-20 11:27:24 -07:00

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(