note 17435 deleted from function.getmxrr by jimw

From: Date: Fri, 14 Dec 2001 20:33:36 +0000
Subject: note 17435 deleted from function.getmxrr by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-22757@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; }

« previous php.notes (#22757) next »