Checking if email is valid

Michael Torrie torriem at gmail.com
Wed Nov 1 20:57:04 EDT 2023


On 11/1/23 04:09, Simon Connah via Python-list wrote:
> Hi,
> 
> I'm building a simple project using smtplib and have a question. I've been doing unit testing but I'm not sure how to check if an email message is valid. Using regex sounds like a bad idea to me and the other options I found required paying for third party services.
> 
> Could someone push me in the right direction please? I just want to find out if a string is a valid email address.

If I had a nickle for every time a web site claimed my email address
wasn't valid I'd be a rich person.  Seems like most attempts at solving
this little problem fall short!


More information about the Python-list mailing list