[-] #PSCFI-3773 : Changed the treatment which validate the email and added a condition for receivers
This commit is contained in:
+1
-1
@@ -83,7 +83,7 @@ class MailCore
|
||||
}
|
||||
|
||||
/* Construct multiple recipients list if needed */
|
||||
if (is_array($to))
|
||||
if (is_array($to) and isset($to))
|
||||
{
|
||||
$to_list = new Swift_RecipientList();
|
||||
foreach ($to AS $key => $addr)
|
||||
|
||||
@@ -45,7 +45,7 @@ class ValidateCore
|
||||
*/
|
||||
public static function isEmail($email)
|
||||
{
|
||||
return empty($email) OR preg_match('/^[a-z0-9!#$%&\'*+\/=?^`{}|~_-]+[.a-z0-9!#$%&\'*+\/=?^`{}|~_-]*@[a-z0-9]+[._a-z0-9-]*\.[a-z0-9]+$/ui', $email);
|
||||
return !empty($email) AND preg_match('/^[a-z0-9!#$%&\'*+\/=?^`{}|~_-]+[.a-z0-9!#$%&\'*+\/=?^`{}|~_-]*@[a-z0-9]+[._a-z0-9-]*\.[a-z0-9]+$/ui', $email);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user