Re:It's Impossible to Validate an Email Address
by thedufer on Sunday April 03, 2016 @12:15PM
(#11416588)
This kind of stuff is great - make suggestions, but allow it to go through even if you think it's wrong. For the last email validation I worked on, there were only 2 absolute blockers - there must be an @ sign, and the domain must have MX records (emails that are technically valid remain useless if we can't send them anything).
There were a number of other checks (being close to yahoo.com or gmail.com or other common email hosts, containing surprising characters, etc) that would trigger warnings, but still allow the check to pass if the user assured us it was correct.
Re:It's Impossible to Validate an Email Address
by tyingq on Monday April 04, 2016 @02:39PM
(#11424237)
>>domain must have MX records
Technically, the RFC(5321) says MX records aren't required. You may be throwing out some small number of valid emails.
"If an empty list of MXs is returned, the address is treated as if it was associated with an implicit MX RR with a preference of 0"
https://github.com/mailcheck/mailcheck
I agree with the idea that it's impossible to validate. But, mailcheck takes the approach of seeing if the email is potentially wrong, then prompting the user with what it thinks they meant. It's usually right, but if not, it allows whatever the user wants.
For example, if your user types in "[email protected]", it will suggest "[email protected]".