note 17435 added to function.getmxrr

From: Date: Sat, 08 Dec 2001 15:39:27 +0000
Subject: note 17435 added to function.getmxrr
Groups: php.notes 
Request: Send a blank email to php-notes+get-22070@lists.php.net to get a copy of this message
I'm a litte bit confused about remarks above. For my opinion the regex versions that use \w in the host part of an email address works not korrekt, \w means [0-9A-Za-z_] and the underline character is not an valid character for a host or domain name. Here is my Version for the is email-address valid problem: function CheckEmailAddress($email) { if (ereg( "^[0-9A-Za-z.-_,]+.*@([0-9A-Za-z]+([.-]?[0-9A-Za-z])*\.[A-Za-z]{2,3})$", $email, $regex )) { if (getmxrr( $regex[1], $mxhosts )) return TRUE; } return FALSE; } -- http://www.php.net/manual/en/function.getmxrr.php http://master.php.net/manage/user-notes.php?action=edit+17435 http://master.php.net/manage/user-notes.php?action=delete+17435 http://master.php.net/manage/user-notes.php?action=reject+17435

« previous php.notes (#22070) next »