The code makes extensive use of regular expressions to check email address components for RFC compliance:
An email address must consist of a local part and a domain part separated by an @ symbol (x40) with a combined length of no more than 256 characters (254 to accommodate SMTP MAIL & RCPT commands).
- RFC 3696 - 3 & errata, RFC 5322 - 3.4.1, RFC 5321 - 4.5.3
As of RFC's 2822 in 2001 & RFC 3696 (and errata) in 2004, backslash (x5C), is not an RFC compliant component of a non-quoted email address local-part. "Stated differently, any ASCII graphic (printing) character other than the at-sign (@), backslash, double quote, comma, or square brackets may appear without quoting. If any of that list of excluded characters are to appear, they must be quoted."
- RFC 3696 section 3. Restrictions on email addresses
Also, the upper limit on address lengths (local-part@domain-part) should normally be considered to be 256 (254 to accommodate SMTP MAIL & RCPT commands).
- RFC 3696 - errata"
And also, contrary to some, domain names beginning with a digit are permitted.
- RFC 1123 - 2.1
Copyright © 2007, 2008, Simon Slick. All Rights Reserved.