forked from science-ation/science-ation
$to must be strict email address, not "name <name@email.com>"
This commit is contained in:
parent
7948e30e61
commit
b095c5d5db
@ -976,7 +976,9 @@ function email_send($val,$to,$sub_subject=array(),$sub_body=array())
|
||||
|
||||
//if our "to" doesnt look like a valid email, then forget about sending it.
|
||||
if(!isEmailAddress($to))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$q=mysql_query("SELECT * FROM emails WHERE val='$val'");
|
||||
if($r=mysql_fetch_object($q)) {
|
||||
@ -1079,14 +1081,7 @@ function getEmailRecipientsForRegistration($reg_id)
|
||||
$ret=array();
|
||||
while($sr=mysql_fetch_object($sq)) {
|
||||
if($sr->email && isEmailAddress($sr->email)) {
|
||||
if($sr->firstname && $sr->lastname)
|
||||
$to=$sr->firstname." ".$sr->lastname." <".$sr->email.">";
|
||||
else if($sr->firstname)
|
||||
$to=$sr->firstname." <".$sr->email.">";
|
||||
else if($sr->lastname)
|
||||
$to=$sr->lastname." <".$sr->email.">";
|
||||
else
|
||||
$to=$sr->email;
|
||||
$to=$sr->email;
|
||||
|
||||
$ret[]=array("to"=>$to,
|
||||
"firstname"=>$sr->firstname,
|
||||
|
Loading…
Reference in New Issue
Block a user