Checking if email is valid

Simon Connah simon.n.connah at protonmail.com
Wed Nov 1 06:09:16 EDT 2023


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.

Thank you.

Simon.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
URL: <https://mail.python.org/pipermail/python-list/attachments/20231101/03a6ce9c/attachment.sig>


More information about the Python-list mailing list