Results 1 to 5 of 5

Thread: Auto Generated email script?

  1. #1
    Join Date
    Mar 2010
    Posts
    22
    Thanks
    6
    Thanked 1 Time in 1 Post

    Default Auto Generated email script?

    Hi All,
    I was just wondering what is the logic behind the auto generated email sent to any person who clicks submit button on forms...or if anyone has worked on any of this sort of script.
    Like in various forms these days when we are done with the mandatory fields we click the submit button and a sweet message is displayed saying "that a confirmation email is sent follow it to activate your account"

  2. #2
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    There are many reasons to do this. One is a confirmation so that you know the log in details you used, or a simple "welcome to our forum/site/blog/whatever" message.

    This does a few things: It allows you to know your submission went through, it allows the site owner to know the email address is valid, protects against spam (when having an activation link sent in the email) and lets you know that because you got the email, you didn't typo anything.

    Having it automated is a blessing for site owners because now anyone can come and join at anytime, and the site owner doesn't have to sit at his computer 24/7 waiting for someone to join so he can click "activate" and send an email.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  3. #3
    Join Date
    Mar 2010
    Posts
    22
    Thanks
    6
    Thanked 1 Time in 1 Post

    Default

    Hi,
    By logic there I meant how can that be acheived in a ny scripting language. I have to get that script to work on my site.

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    It must use a server side language like PHP and (probably) a database or some other way to store the information.
    The registration (or other action) is set up in the normal way. But it doesn't get "confirmed" until the user clicks the link. You can delay the "confirmation" in several ways.
    The most common is to just register the user and have a field in the database called verified that is by default set to 0-- the account is disabled. If they try to log in, it asks for a verification code.
    Then when they enter the code, it changes that to 1, and the account works.

    Another way to try it would be to store the information temporarily (like in a session) and then send the email and they must check it then or nothing will be stored. So: they enter password, username, etc., click submit, the screen says "ok, now enter the confirmation code just sent to your email address"; they check their email, find the message and they enter it; everything is verified.


    Nothing in that is too complex, just the overall system. Using standard database techniques and standard form verification, you should be fine. The only other piece to add is automating an email, so just look at the mail() function for PHP or a similar option for another language if you can't use PHP.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. #5
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Ohh, sorry, I thought you meant it as in "what is the point?" LOL.

    But umm.. yeah.. what Daniel said.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •