How to validate emails properly in your app (beyond regex)
Regex is not enough for email validation. A string can pass /^[^\s@]+@[^\s@]+\.[^\s@]+$/ and still be completely useless — the domain doesn't exist, the mailbox is gone, or it's a throwaway address...

Source: DEV Community
Regex is not enough for email validation. A string can pass /^[^\s@]+@[^\s@]+\.[^\s@]+$/ and still be completely useless — the domain doesn't exist, the mailbox is gone, or it's a throwaway address that will never convert. Here's what proper email validation looks like, and how to add it to your app in minutes. The problem with regex-only validation // This passes regex: "[email protected]" // domain has no MX records "[email protected]" // disposable, will never convert "[email protected]" // role email, useless for marketing "[email protected]" // typo, user will never get your email All of these are "valid" by format. None of them are useful. What you actually need to check Format — RFC 5322 compliance MX records — does the domain have mail servers? SMTP — does the mailbox actually exist? Disposable detection — is it a throwaway domain? Role detection — is it admin@, info@, support@? Typo suggestion — did they mean gmail.com? Using Email Validator API I built an API