TIL that email-addresses can have comments.

> `john.smith(comment)@example.com` and `(comment)[email protected]` are both equivalent to `[email protected]`

Here, hold my beer, I'm off, breaking that regex validation in your app.

Reading up on this, confirms my stance that the only proper email-address-validation is "send an email and if it arrives, the address is valid".

@berkes if it doesn't arrive, it can still be valid. Your e-mail could end up being junked, or the receiving mail server doesn't implement the protocol properly, or it's just having a really bad day, you know.

Of course, it it does end up in a mail box, you can be reasonably sure that the address is valid. But only reasonably. Not fully. Never fully.


@doenietzomoeilijk my stance is that there are four states of email validation. Not two: valid/invalid. But four:

1 pending validation.
2 confirmed valid in the past.
3 probably invalid.
4 confirmed invalid.

Most apps will only need 1&2. 3&4 are when you start getting bounces or errors. 2 in practice means: (confirmation)email was read (proven by eg clicking a link)

@doenietzomoeilijk and 'valid' has an expiration. An address may be valid today, but invalid tomorrow. E.g when a person leaves a company, school, provider.

Which, again, is easily solved by not regex-validating, but just sending the mail: as long as it arrives, it is valid. As long as it is read, that's confirmed valid.

Sign in to participate in the conversation
Bitcoin Mastodon

Bitcoin Maston Instance