SPUG: Checking Email Addresses

Daniel Chetlin daniel at chetlin.com
Fri Oct 6 02:35:35 CDT 2000

On Thu, Oct 05, 2000 at 11:30:43PM -0700, David Vergin wrote:
> Is there a way to poll an email server to see if it recognizes a specific
> address? (And then display an error message to the user right away)
> Or if the script sent the email and checked for a bounce would the bounce arrive
> back in time to present an error message to the user waiting for a confirmation
> page after hitting 'Submit'? I.e. how fast do emails to bad addresses bounce?
> [hmmm... seems like there are several ways/levels in which an email address can
> be 'bad']

>From perlfaq9:

=head2 How do I check a valid mail address?

The basic answer to this question is: Do not. You can check the address
itself to be sure that it's well-formed, but RFC 822 is so broad that
you could throw some random characters together and they'd probably make
a well-formed mail address. Even so, see Abigail's RFC::RFC822::Address
for this.

But don't try to come up with a way to make sure that the user has given
an email address that will deliver to them. Simply have them repeat it
to eliminate errors, or show it to them and ask for a confirmation.
There's nothing else you can do.


 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
  Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/

More information about the spug-list mailing list