by cratermoon · 5y ago · 0 comments
This allows a person to use any damn thing they want as their email address, provided it works and they can get the email.
Also, humans make mistakes. You should detect spelling errors and typos then suggest corrections. [3]
[1] https://www.mailjet.com/blog/news/3-factors-that-impact-your...]
Always send the confirmation "did you sign up?" email. Always.
It's hard to be smart with something like names.
In practice, you build your UI for the latter. You add captchas or other friction for the former.
Obviously, this is a different scenario than your bank not accepting your valid (per RFC) email address. Which is why any sort of blanket advice is pretty dumb. Not that I care to aid spammers...
The other scenario might be a site that puts up a "paywall" type thing, where you are forced to enter an email address to gain quick access to something, but doesn't want to bother you with going and verifying an email (e.g. instant discounts, downloading a PDF, etc.). Or in-person email address collection when you buy something in a store. It's never a good idea to collect email addresses of people that have no desire to subscribe to your marketing.
- https://blog.jgc.org/2010/06/your-last-name-contains-invalid...
- https://haacked.com/archive/2007/08/21/i-knew-how-to-validat...
- https://fosdem.org/2018/schedule/event/email_address_quiz/
Send that address a confirmation email. Now you've got consensual opt-in and you've somewhat protected yourself from adding a wrong address to your recurring mailing list.
Prevent abuse with long (seconds) delays between submissions from the client. If the user thinks they did it right, they're waiting on their email inbox anyway; if they immediately realize they made a typo, it'll take 2-3s to fix.
The RFCs were written when manually (not from cron) sending email to another user on your local system as a thing that actually happened. I'm certain you actively want to avoid that now.
If I can send you an email and you can verify that you have access to that email, your email is "valid enough" for me.
Then, the validation is basically "is there an @ and after a dot in there?". I find that after that, every hour spent on improving the validation will just cause more emails falsely flagged as invalid, more support requests from the people who couldn't sign up with valid emails, it's code we need to maintain, anytime edits the validation logic risks breaking sign ups completely.
So with more "improvements" to the validation, you just cause more problems. Then why do it?
I hear the reputation arguments, but in practice, it never happened to any of the organizations I worked for.
What happens though very often is naive engineers trying to solve problems the business doesn't have with knowledge they lack...
premature implementation is the source of most evil. :-)