summaryrefslogtreecommitdiff
path: root/it_mail.class
diff options
context:
space:
mode:
Diffstat (limited to 'it_mail.class')
-rw-r--r--it_mail.class8
1 files changed, 4 insertions, 4 deletions
diff --git a/it_mail.class b/it_mail.class
index 6394e5f..ab75ffc 100644
--- a/it_mail.class
+++ b/it_mail.class
@@ -408,9 +408,11 @@ static function send_smtp_cmd($fp, $cmd, &$answer, $timeoutok = false, $failcode
/* Return errors found with email address, null otherwise
*/
-static function address_error($email)
+static function address_error($emails)
{
- return it::match(self::$addr_regex, $email) ? null : "invalid format";
+ foreach (it::split(',\s*', $emails) as $email)
+ if (!it::match(self::$addr_regex, $email) && !it::match('^[a-z][-a-z0-9]*$', $email))
+ return "invalid format";
}
@@ -528,5 +530,3 @@ static function check_email($email, $checkmailbox = false)
}
}
-
-?>