SPUG: Checking Email Addresses

Ice Demon admin at qdq.net
Fri Oct 6 12:11:16 CDT 2000


David Vergin wrote:

> Working on an on-line conferencing package...
>
> User registers for the first time giving name and email address.
> Script reads data and sends a message with password to user's email address.
>
> But the user unknowingly mis-types his/her email address and then waits forever
> for the password to arrive.
>
> <Question>
> 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']
>
> Is there a solution I am not considering?
>
> As always, url's, rtfm's, clues, suggestions of key words for searches, all
> welcome.
>
> tia
> David

There is a module called Mail::CheckUser at
http://search.cpan.org/search?dist=Mail-CheckUser

It will do 3 things (which you can turn off some)
1. Checks the syntax of the email address.
2. Checks the MX record for the email's domain name
3. It tries to connect to the email server via SMTP to see if the mailbox is valid.

The problem with using this module is that is takes a while to check these things
and the browser can time out during the check or the person can be waiting for a
while for this stuff to be checked. Your best bet would be to do what Daniel said
and have them enter their email twice rather than checking to see if it can
actually reach them.



 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     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