Checking if email is valid

Grant Edwards grant.b.edwards at gmail.com
Fri Nov 3 12:57:34 EDT 2023


On 2023-11-02, Michael Torrie via Python-list <python-list at python.org> wrote:
> On 11/2/23 00:42, Simon Connah via Python-list wrote:
>
>> Valid as in conforms to the standard. Although having looked at the
>> standard that might be more difficult than originally planned.
>
> You'll have to read the relevant RFCs.  Lots of corner cases!  From what
> I can see virtually no one on the internet gets it right, judging by the
> number of times I have valid email addresses flagged as not valid by
> poor algorithms.

I've wondered if there are addresses that violate the RFC (and would
therefore be "correctly" rejected), but but in practice will work just
fine.  I've never spent enough time looking at the RFC to even propose
test cases for that...

--
Grant


More information about the Python-list mailing list