"Renze Munnik" <[EMAIL PROTECTED]> 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/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to