Re: Regex for email validation
| From: | Per Jessen | Date: | Wed, 27 Aug 2008 18:35:04 +0000 |
| Subject: | Re: Regex for email validation | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-278814@lists.php.net to get a copy of this message | ||
tedd wrote:
>
>>No, they can't. There are no 8-bit characters allowed in an
>>email-address. Check out RFC2821.
>
> You can throw all the facts and documentation you want at me, but the
> left side of the @ has always been open to anything you want.
Except anything 8-bit, yes. Seriously, read RFC2821 and maybe -2822
> The right side of the @ has had to deal with 7-bit limitation (the
> DNS problem). But, considering the work that the IDNS has done, (circa
> 2000) we can use Unicode characters on both sides of the @.
No, you cannot. Certainly not on the left side, and only on the right
side if you assume visual representation = email-address.
Why don't you send me an email at this address: à@jessen.ch (that's an
a with accent grave like in your domain further down).
> However, the software (browsers and email apps) may/may-not be able to
> deal with it, as shown by my recent example of:
>
>> > tedd@à.com
>>>
>>> is a legal and working email address.
>>
>>If that reads "tedd(at)<space>.com", it might be valid on your system,
>>but not in public.
>
> The email address is perfectly valid, and works,
> but our definition of "public" is apparently
> different.
Sorry, I didn't see the a with the accent grave. Still, try using that
address in Thunderbird, and you'll see that it doesn't work. The
correct email-address (which is what we're talking about)
for 'tedd@à.com' is tedd@xn--0ca.com, which an email-system like
sendmail/exim/postfix/etc will understand (whereas it will choke
on 'tedd@à.com'.
> So, regardless of the documentation, which may be outdated, I know
> that Unicode characters can be used in IDNS and thus on both sides of
> the @,
You're wrong - IDNs only apply to the right side of the @. (check out
what the 'D' means).
Go on, send me that email to 'à@jessen.ch' ... for what it's worth, I
can't even define an account like that, so my mailserver might well
reject it.
/Per Jessen, Zürich