Re: Email Verification

From: Date: Wed, 17 Sep 2008 16:33:26 +0000
Subject: Re: Email Verification
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-280370@lists.php.net to get a copy of this message
At 2:20 PM +0100 9/17/08, Tom Chubb wrote:
Can anyone offer advice on best practices for email address verification? Obviously for user registration it's common to click a link in your email to complete the process thereby verifying the email, but if you want to keep things very simple for the end user, what are the best methods? I have been looking at getmxrr and the examples feature some good advice, etc. One that I've found that I'm thinking of using is http://www.tienhuis.nl/php-email-address-validation-with-verify-probe which tries to connect to the SMTP server as well as mx lookup, etc. How reliable are these? With new domain name extensions appearing all the time I wanted to find something better than a regex which might become outdated after a while and I'd never know about it! Thoughts please and thanks in advance
Tom: To obtain a 100% valid email address you must take measures to validate it -- there are no short cuts. Here's a working example I use for users posting comments (I'm still working on it): http://sperling.com/comments/an-example/ The Explanation provides an explanation (what else?). Plus, leaving a comment will show you how the process works. One of the important points here is that this will only collect validated and willing email addresses. Of course, the javascript routine to review email addresses after the user clicks submit will give the user a head's-up if the email address isn't properly formatted, but in the end the server-side must recheck everything anyway. So, JS in this case is just an example of progressive enhancement. Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com

« previous php.general (#280370) next »