need a plug-in email confirmation system

Posted on 2005-04-15
Last Modified: 2013-12-25
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.
Question by:horstuff
    LVL 28

    Expert Comment

    use Email::Valid

    EXAMPLES from the cpan doc

    Let's see if the address '' conforms to the RFC822 specification:

      print (Email::Valid->address('') ? 'yes' : 'no');

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

      print (Email::Valid->address( -address => '',
                                    -mxcheck => 1 ) ? 'yes' : 'no');
    LVL 28

    Expert Comment

    LVL 51

    Accepted Solution

    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

    Featured Post

    Courses: Start Training Online With Pros, Today

    Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

    Join & Write a Comment

    If you get a (Blue Screen of Death), your system writes a small file called a minidump. Your first step is to make certain your computer is setup to record memory dumps. Right click My Computer, choose properties. Click on the advanced tab, an…
    Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
    The viewer will learn how to count occurrences of each item in an array.
    The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now