If i wanted an email verifier I would look at open source frameworks and see how they do it. Django comes to mind.--(Unsigned mail from my phone) -------- Original message --------From: Michael Torrie via Python-list <python-list@python.org> Date: 3/11/23 07:23 (GMT+10:00) To: python-list@python.org Subject: Re: Checking if email is valid On 11/2/23 00:42, Simon Connah via Python-list wrote:> Basically I'm writing unit tests and one of them passess in a string > with an invalid email address. I need to be able to check the string > to see if it is a valid email so that the unit test passess.If you truly have managed to code an RFC-compliant verifier, I commend you.> 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 whatI can see virtually no one on the internet gets it right, judging by thenumber of times I have valid email addresses flagged as not valid bypoor algorithms.-- https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list
- Re: Checking if email is ... D'Arcy Cain via Python-list
- RE: Checking if email is ... AVI GROSS via Python-list
- Re: Checking if email is vali... D'Arcy Cain via Python-list
- Re: Checking if email is vali... Jon Ribbens via Python-list
- Re: Checking if email is valid Cameron Simpson via Python-list
- Re: Checking if email is valid Simon Connah via Python-list
- Re: Checking if email is valid Jon Ribbens via Python-list
- Re: Checking if email is valid Chris Angelico via Python-list
- Re: Checking if email is valid Simon Connah via Python-list
- Re: Checking if email is valid Michael Torrie via Python-list
- Re: Checking if email is valid Mike Dewhirst via Python-list
- RE: Checking if email is vali... AVI GROSS via Python-list
- Re: Checking if email is ... Chris Angelico via Python-list
- Re: Checking if emai... Jon Ribbens via Python-list
- Re: Checking if emai... Thomas Passin via Python-list
- Re: Checking if emai... Simon Connah via Python-list
- Re: Checking if emai... Michael Torrie via Python-list
- Re: Checking if emai... Grant Edwards via Python-list
- Re: Checking if emai... D'Arcy Cain via Python-list
- Re: Checking if emai... gene heskett via Python-list
- Re: Checking if emai... Grant Edwards via Python-list