• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 177
  • Last Modified:

need a plug-in email confirmation system

I have a .cgi script which is functioning (a simple guestbook type thing), but there is no way to validate/confirm a user's e-mail address. I want to require a message poster to enter their email address, then I want to send them a confirmation mail, then they click the link in the mail, then they can continue and they are confirmed to be able to post a message. I know this seems like the long way around, but I already have this message board up and running and don't want to install a whole new one if I don't have to.
0
horstuff
Asked:
horstuff
  • 2
1 Solution
 
FishMongerCommented:
use Email::Valid
http://search.cpan.org/~maurice/Email-Valid-0.15/Valid.pm

EXAMPLES from the cpan doc

Let's see if the address 'maurice@hevanet.com' conforms to the RFC822 specification:

  print (Email::Valid->address('maurice@hevanet.com') ? 'yes' : 'no');

Additionally, let's make sure there's a mail host for it:

  print (Email::Valid->address( -address => 'maurice@hevanet.com',
                                -mxcheck => 1 ) ? 'yes' : 'no');
0
 
FishMongerCommented:
0
 
ahoffmannCommented:
FishMonger, the problem is to get a positive response from the email owner, not to check the validity of the email itself

horstuff, I don't know of a redy-to-use module to do this, but I'd do it as follows

 1. check email address for valid characters
 2. create a file named with the given email address
 3. send confirmation request with a From: and Reply-To: address of your system
 4. setup an automatic script (for example with procmail) to accept mails from 3.
    if the script detects a file (see 2.) from the sender of the mail, accept this email as valid user, then delete the file
    in any other case simply discard the email
 5. cleanup your files from 2., for example all files older than 30 days
 6. enjoy
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now