Checking if email is valid

Simon Connah simon.n.connah at protonmail.com
Thu Nov 2 02:46:47 EDT 2023


> 

> 

> On Thu, 2 Nov 2023 at 05:21, Simon Connah via Python-list
> python-list at python.org wrote:
> 

> > Could someone push me in the right direction please? I just want to find out if a string is a valid email address.
> 

> 

> There is only one way to know that a string is a valid email address,
> and that's to send an email to it.
> 

> What is your goal though? For example, if you're trying to autolink
> email addresses in text, you don't really care whether it's valid,
> only that it looks like an address.
> 


My goal is to make a simple mailing list platform. I guess I could just send email to an address and if it bounces then I can remove it from the database. Thing is I'm not sure how close to a real email address an email has to be in order to be bounced. If it was completely wrong it might just swallowed up.

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/20231102/f425e529/attachment.sig>


More information about the Python-list mailing list