2/22 Can someone point me to an RFC that specifies which ascii characters
are valid in email addresses? I can't seem to find it in 2821 or
2822. -John
\_ It's scattered around RFC 2822. The actual definition of an email
address (addr-spec) is section 3.4.1, but it refers to a lot of
stuff from earlier in section 3.
\_ Cool, thanks. I noticed that a lot of online email
address parsers reject 'a+b@domain.com'--was just sort of
wondering whether there's anything they're "supposed" to
accept. -John
The upshot is that nearly any ASCII character is allowed if quoted
properly, including whitespace and control characters. The only
thing you can't have at all is a NUL character -- and even that
used to be permitted, so RFC 2822 still requires you to handle it
properly. Non-ASCII characters (anything above 127) are not
allowed; RFC 2047 specifies the =?ISO-8859-1?Q?=E9?= syntax for
encoding them.
Of course, you may not want to send mail to anyone belligerent
enough to have control characters in their email address. --mconst
\_ ooooh, sweet. I never thought of that. If I had control chars
in my email address do you think that would avoid all spam? |