Există greșeli în următorul cod ?
function valid_email($email) {
//Regular expression string to evaluate the email
$regex = '/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/';
//Checks for a match to the expression
if (preg_match($regex, $email)) {
//Check for valid domain(helps avoid eronious emails)
list($username, $domain) = split("@", $email);
return getmxrr($domain, $mxrecords);
} else {
return false;
}
}