|
Hi everyone!
I want to get the idea on how to develop a so called "auto-reply" or "auto-answering" or "auto-update" system.
Let's take some example. I'm sure we all have been through many site whereby we have to register as either free member or subscribe member to enjoy the services. Usually for Free members, they have to provide a valid e-mail ID upon registration. Once a new member register they have to verify that the email they provided is valid. Therefore upon completion, user have to log in to their email account and click to a link to activate their account in that particular site.
My question is how does the overall flow work? My idea was as follow:
1.) User register
2.) Based on the given email, send a link to the user such as <a href="example.com?memberid=123></a>
3.) If user click on the link then it will update the database and check on the activate box.
4.) Only then user can login as a valid member
Is this the correct pratice by those experts? Am I having the valid and strong concept here? Do let me know if I'm wrong or shall there be more flow in between.
Also how does a program actually auto-update or auto-send email, newsletter without having someone to physically click on it?
Thanks!
|
|
|
You have the basics correct, swspm. New members will submit a signup form. There are several things you can do on the backend, but one method would be to create the account in your member table with a column named "ENABLED" set to 0 (false). Have another column where you store a GUID or a unique code of some kind. This will be your account activation code. Have your server send an email to the user with a link to your activation page passing the unique code as a parameter. When the user hits this page, your server will look up the account based on the GUID, and if it finds it, set ENABLED to 1 (true).
This is exactly what you described except you don't want to just send the userID as the activation code because if your system ever displays the userID, they could falsely activate an account. A more random and unique code is better -- such as a GUID.
Now, how to send an email from an ASP page. One of the most popular methods is to use the AspEmail component. There is a free version of it available. If you are using a hosting company, they probably already support this component. AspEmail Component from Persits http://www.persits.com/
The built in Windows server method is to use CDONTS. You can see an example of using CDONTS at this thread. http://www.codetoad.com/forum/16_18023.asp
Or you can just look up CDONTS in a search engine. (If you have AspEmail, use it. I don't have personal experience with CDONTS, but from what I understand, it has a bad reputation.)
|
|
|
|
|
|
|
|
|
|