Re: validating email address

From: Date: Thu, 04 Dec 2003 02:49:19 +0000
Subject: Re: validating email address
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-171763@lists.php.net to get a copy of this message
On Thursday, December 4, 2003, at 01:35 PM, John W. Holmes wrote:
Blake Schroeder wrote:
Whats the best way to validate email address (check for white space, check for .com, .net.edu etc)
Just check for some text with a single @ in the middle. Honestly... If you're relying on the email any more than that, I'd have to wonder > why. The only way to truly validate an email address is to send an email to it with a code (or webbug) validating the user (or bot) actually received the email.
The only email validation script I've been comfortable with is this: http://www.killersoft.com/downloads/pafiledb.php?action=file&id=5 It's a PHP port of a widely accepted Perl script which (from the comments): // Follows RFC 822 about as close as is possible. // http://www.faqs.org/rfcs/rfc822.html Other than that, yeah I'd just check for "something"@"something with at least one period" Justin French

« previous php.general (#171763) next »