Published in: PHP
function checkEmail($email) { // Create the syntactical validation regular expression $regexp = "^([_a-z0-9-]+)(\.[_a-z0-9-]+)*@([a-z0-9-]+)(\.[a-z0-9-]+)*(\.[a-z]{2,4})$"; // Presume that the email is invalid $valid = 0; // Validate the syntax { // Validate the domain $valid = 1; } else { $valid = 0; } return $valid; }
Comments
Subscribe to comments
You need to login to post a comment.

Nice. getmxrr - would this slow down the script if I use a non-existing domain?