Re: Validation Email in PHP programs

From: Date: Tue, 03 Apr 2001 15:17:14 +0000
Subject: Re: Validation Email in PHP programs
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-46829@lists.php.net to get a copy of this message
"Renze Munnik" <renze@datalink.nl> wrote: > Besides the RE you might wanna take a look at these functions: > > http://www.php.net/manual/en/function.getmxrr.php > and > http://www.php.net/manual/en/function.checkdnsrr.php > > Using (one of) those you can check the email-address better. I.e. > the domain. Extract the domainname from the given email-address and > feed it to either one of these and you'll get a result whether or > not the domain has an MX-record. Here's some personal insight to consider. This will work and I toyed with it in the past. There are a few gotchas: 1. For a valid host, if DNS is slow it may add several seconds to the script. 2. If it's not a valid host, the script will run until the lookup times out. 3. If the host is temporarily down or inaccessible it will falsely report that it doesn't exist. So it really depends what you're trying to do. > Only thing left is whether or not > the user exists on the given mailserver. But for as far as I know > you can't automatically check that. Renze is correct. Unless you're checking local email addresses which you control, there's no way to check down to that level. And be happy there isn't. Otherwise the amount of spam you get right now will increase ten fold. -- Steve Werby President, Befriend Internet Services LLC http://www.befriend.com/

« previous php.general (#46829) next »