diff options
-rw-r--r-- | it_mail.class | 2 | ||||
-rwxr-xr-x | test/it_mail.t | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/it_mail.class b/it_mail.class index 5924569..63bcc28 100644 --- a/it_mail.class +++ b/it_mail.class @@ -507,7 +507,7 @@ static function address_error($addresslist) foreach (self::addrlist_split($addresslist) as list($dummy, $email)) { $email = self::email_encode($email); - if (filter_var($email, FILTER_VALIDATE_EMAIL) === false && !it::match('^\s*[a-z][-a-z0-9]*\s*$', $email)) + if (filter_var($email, FILTER_VALIDATE_EMAIL, FILTER_FLAG_EMAIL_UNICODE) === false && !it::match('^\s*[a-z][-a-z0-9]*\s*$', $email)) return "invalid format on $email"; } } diff --git a/test/it_mail.t b/test/it_mail.t index 41a92b1..12b70d0 100755 --- a/test/it_mail.t +++ b/test/it_mail.t @@ -101,7 +101,7 @@ is( ); is( - it_mail::address_error('neuman@example.com, <neuman@example.com>, "Neuman, Alfred E." <neuman@example.com>, aneuman, "<neuman@example>" <neuman@example.com>, " neumann@example.com", "www@search.ch".foo.bar@local.ch, test@sör.ch'), + it_mail::address_error('neuman@example.com, <neuman@example.com>, "Neuman, Alfred E." <neuman@example.com>, aneuman, "<neuman@example>" <neuman@example.com>, " neumann@example.com", "www@search.ch".foo.bar@local.ch, test@sör.ch, müller@search.ch'), null, "Accept valid e-mail addresses" ); |