Steven Walker wrote:
> Does anybody know any good ways (or available code) for verifying email
> Checking syntax is not enough.. I'd like to actually be able to test
> whether the email address exists.
Nothing is 100%, so don't exclude people because you can't verify them.
There are 2 types of email addresse:
The 'type' is determined by talking to the mail host of the domain, but
this is, at best, an inexact science.
Verifiable means that you've connected to the mail host and indicated
you had mail for a specific user account and it did not reply back 'user
unknown'. That is the best you can hope for, because once that mail
system accepts it for delivery, it may still not be delivered to the end
user for a number of reasons - no mailbox space left, for example. Or
in fact, the specific user account DOESN'T exist, but the mail server is
set to accept all incoming mail first, and does more precise error
checking at a later time.
Unverifiable would mean that the mail server will actually tell you up
front that an account doesn't exist, or isn't accepting mail from you,
or has a full mailbox, or whatever.
So you might be able to tell if an account specifically DOES NOT exist,
but you can never be certain that an account actually does exist without
completely sending a mail, and hoping that it'll bounce to the right
place if there's a problem.
The way to do this is to use SMTP to talk to the other mail host - Zend
has some code snippets like the one referenced below (probably others,
but here's a starting point)
Hope that helps some...
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php