Skip to content

Commit

Permalink
Merge branch '1.3-misc' of github.com:cakephp/cakephp1x into 1.3-misc
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Jan 5, 2010
2 parents 2aee4b6 + 9d50158 commit cf69753
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cake/libs/validation.php
Expand Up @@ -501,8 +501,13 @@ function email($check, $deep = false, $regex = null) {
}

if ($return === true && preg_match('/@(' . $_this->__pattern['hostname'] . ')$/i', $_this->check, $regs)) {
$host = gethostbynamel($regs[1]);
return is_array($host);
if (function_exists('getmxrr')) {
return getmxrr($regs[1], $mxhosts);
}
if (function_exists('checkdnsrr')) {
return checkdnsrr($regs[1], 'MX');
}
return is_array(gethostbynamel($regs[1]));
}
return false;
}
Expand Down

0 comments on commit cf69753

Please sign in to comment.