[rt-users] no alert for invalid mail addresses
Jeffrey Pilant
jeffrey.pilant.ext at bayer.com
Fri Jan 6 15:20:03 EST 2017
Martin Wheldon writes:
> You might want to checkout the perl module Regex::Common::Email::Address
I looked at that
http://search.cpan.org/~cwest/Regexp-Common-Email-Address-1.01/lib/Regexp/Common/Email/Address.pm
Provides a regex to match email addresses as defined by RFC 2822. Under
C<{-keep}>, the entire match is kept as C<$1>. If you want to parse that
further then pass it to C<< Email::Address->parse() >>. Don't worry,
it's fast.
This is from 2005, and the that RFC was replaced by 5322, which is what the big regex I gave was from.
The Wikipedia has even more relevant info on email addresses:
https://en.wikipedia.org/wiki/Email_address
It talks about support for foreign character sets, quoted normally invalid characters, allowed comments, and do on. Basically, it is nearly complete chaos. Check out their "valid" and "invalid" examples, as well as the internationalization example.
/jeff
________________________________________________________________________
The information contained in this e-mail is for the exclusive use of the
intended recipient(s) and may be confidential, proprietary, and/or
legally privileged. Inadvertent disclosure of this message does not
constitute a waiver of any privilege. If you receive this message in
error, please do not directly or indirectly use, print, copy, forward,
or disclose any part of this message. Please also delete this e-mail
and all copies and notify the sender. Thank you.
________________________________________________________________________
More information about the rt-users
mailing list