summaryrefslogtreecommitdiff
path: root/it_mail.class
diff options
context:
space:
mode:
authorUrban Müller2022-03-28 18:16:33 +0200
committerUrban Müller2022-03-28 18:16:33 +0200
commit46e79a9468ca88b51c1a8982b600f243ce0a6ffe (patch)
tree18f5464cba5f155757a0cfba1d2aa3bd950191dd /it_mail.class
parent8d79006992b064fef8fcb13a1b3fe28a6aad774b (diff)
downloaditools-46e79a9468ca88b51c1a8982b600f243ce0a6ffe.tar.gz
itools-46e79a9468ca88b51c1a8982b600f243ce0a6ffe.tar.bz2
itools-46e79a9468ca88b51c1a8982b600f243ce0a6ffe.zip
handle missing closing bracket, remove blanks around email (filter_var balks)
Diffstat (limited to 'it_mail.class')
-rw-r--r--it_mail.class2
1 files changed, 1 insertions, 1 deletions
diff --git a/it_mail.class b/it_mail.class
index eb2cbb9..4119994 100644
--- a/it_mail.class
+++ b/it_mail.class
@@ -419,7 +419,7 @@ static function address_error($addresslist)
}
foreach ($addresses as $address)
- if (($email = it::match('<([^>]*)', $address) ?? $address))
+ if (($email = it::match('<([^>]*)>', $address) ?? trim($address)))
if (filter_var($email, FILTER_VALIDATE_EMAIL) === false && !it::match('^\s*[a-z][-a-z0-9]*\s*$', $email))
return "invalid format on $email";
}