This article mainly introduces the implementation of JS and PHP email address verification, a friend in need can refer to
There are many ways to verify mailbox addresses. In the browser side, JS mailbox authentication can be detected through regular expressions. For example: code is as follows: function isemail (email) { return/^ (([a-z]|d|[! #$%& ' *+-/=?^_ ' {|} ~]| [U00A0-UD7FFUF900-UFDCFUFDF0-UFFEF]) +(. ([a-z]|d| [!#$%& ' *+-/=?^_ ' {|} ~]| [U00A0-UD7FFUF900-UFDCFUFDF0-UFFEF]) +)*)| ((x22) (((x20|x09) * (x0dx0a))? x20|x09) +)? ([x01-x08x0bx0cx0e-x1fx7f]|x21| [x23-x5b]| [x5d-x7e]| [U00A0-UD7FFUF900-UFDCFUFDF0-UFFEF]) | ([x01-x09x0bx0cx0d-x7f]| [U00A0-UD7FFUF900-UFDCFUFDF0-UFFEF]))) * (((x20|x09) * (x0dx0a))? (x20|x09) +)? (x22))) @ (([a-z]|d| [U00A0-UD7FFUF900-UFDCFUFDF0-UFFEF]) | ([a-z]|d| [U00A0-UD7FFUF900-UFDCFUFDF0-UFFEF]) ([a-z]|d|-|.| _|~| [U00A0-UD7FFUF900-UFDCFUFDF0-UFFEF]) * ([a-z]|d| [U00A0-UD7FFUF900-UFDCFUFDF0-UFFEF])).) + ([a-z]| [U00A0-UD7FFUF900-UFDCFUFDF0-UFFEF]) | ([a-z]| [U00A0-UD7FFUF900-UFDCFUFDF0-UFFEF]) ([a-z]|d|-|.| _|~| [U00A0-UD7FFUF900-UFDCFUFDF0-UFFEF]) * ([a-z]| [U00A0-UD7FFUF900-UFDCFUFDF0-UFFEF])) $/i.test (email); The call is simple: The code is as follows: if (Isemail (' youremail@yourdomain.com ')) {Console.log (' this Is email is valid '); } If server-side validation is performed. Like PHP, the simplest thing is: code is as follows: * * email address legality verification */ function Isemail ($mail _address) { return fi Lter_var ($mail _address, filter_validate_email); But this thing can also be complicated. like this. He built up a set of email address verification website system. It is estimated that few people do so. To tell the truth, have to admire.