View Full Version : Auto Generated email script?
andysam
04-22-2010, 01:00 AM
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"
BLiZZaRD
04-22-2010, 01:23 AM
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.
andysam
04-22-2010, 05:36 AM
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.
;)
djr33
04-22-2010, 02:27 PM
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.
BLiZZaRD
04-22-2010, 09:42 PM
Ohh, sorry, I thought you meant it as in "what is the point?" LOL.
But umm.. yeah.. what Daniel said.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.