Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

COLD FUSION MAILING LIST SETUP

Status
Not open for further replies.

kingjjx

Programmer
Sep 18, 2001
181
US
Hi, I am working on a project. I want to enable people to SUBSCRIBE or UNSUBSCRIBE to different types of mailist list. They go to page.html and there is a list of the different mailing lists available, user can pick which list he/she wants and can subscribe/unsubscribe to that list. What is the best way to store the mailing list ? and I dont know how to code this (never done anything with mailing before). Right now, the old page is using CGI and the mailing list is stored in EudoraWorld Mail. Can somebody please help me. Anything will be very much appreciated. Thank you
 
Hi,

Cold Fusion has a tag called CFMAIL that can send e-mails through SMTP. It can take a Cold Fusion query, allowing you to have dynamic content in the e-mail itself. Check out the docs. Ben Forta's Cold Fusion book does a good job of explaining the use of this tag.

hope this helps. Klotzki
 
Kingjjx,

The best way to save the items is to use a database. Create a db for mailing lists and set up a dsn so that cf can find the database. Create 1 table for user info, probably just email addresses and an auto_number (identity seed on sql server) id field.

Next you want to create a table for each mailing list, this table should have an autonumber id field, and a numeric userID field (this is where you will store a subscribed user's memberTable.id).


When someone want to add themselves to a mailing list, check the user table to see if that email exists, if it doesn't then add it.

Get the membertable.id value for the email address.

Next, look into the table(s) that realte to the mailing list(s) which they have selected to see if the memberid already exists in the list table for each list that was chosen, if it does not, then add it.

Basically, the same thing for unsubscribing, check to see if the memberID is in the list table, if it is, remove that record.

You can do this without the member table, just by inserting the email directly in the mailing list table, but this is not a normalized database design, and some people tend to flail about verbally when you do not normalize a db.

Hope this helps,

David Giffin
Davtri Interactive Design
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top