FREE! An Email Newsletter Using ASP Smart Mailer and Advanced HTML Editor Support
Take a look at Matt Machell's latest tutorial where he describes how you can use Dreamweaver MX 2004 along with the DMXZone ASP Smart Mailer and Advanced HTML Editor extensions to produce a straightforward mailing list and newsletter application.
Well if you're in that situation, take a look at Matt Machell's latest tutorial where he describes how you can use Dreamweaver MX 2004 along with the DMXZone ASP Smart Mailer and Advanced HTML Editor extensions to produce a straightforward mailing list and newsletter application.
An Email Newsletter Using ASP Smart Mailer and Advanced HTML Editor
This tutorial is going to take you through creating a mailing list application to send out a newsletter for your site. We'll be using the basic ASP Server behaviors from Dreamweaver MX 2004 along with the DMXZone ASP Smart Mailer and Advanced HTML Editor extensions.
You'll also need some ASP web hosting with one of the mail components supported by ASP Smart Mailer installed (CDO, CDONTS, ASPMail, ASPEmail and Jmail).
How the Application works
Our application is split into two parts, the part the users see and the part the administrator sees.
Our users see a form where they submit their name and email to be added to the newsletter subscription list. When they submit this they get a confirmation. On receiving a newsletter, they'll also get a unsubscribe notice allowing them to remove their address from the database.
Our admin person gets a restricted access area to design the newsletter (using the Advanced HTML Editor), preview the result, make any alterations and then send it (using ASP Smart Mailer). They also get a confirmation when the send is finished.
Basic Design
First of all define a site, if you've been following the last few tutorials, then use the DMX Jazz site and basic database connection that we used before. You can find more information in the first article in the series.
Our application will use 8 ASP files split across the two areas. The users will be:
· Signing Up (mailshot_signup.asp)
· Receiving a confirmation of their sign up (mailshot_confirm.asp)
And if they wish to leave the scheme:
· Unsubscribing (mailshot_remove.asp)
· Receiving a confirmation of unsubscription (mailshot_unsub_confirm.asp)
The sending area for the administrator is split across four pages, and follows the following process:
· Login (mailshot_login.asp)
· Create Newsletter (mailshot_admin.asp)
· Preview/Send (mailshot_send.asp)
· Confirm Send (mailshot_done.asp)
We'll be looking at the users pages and the admin pages in turn, but firstly we have to set up a back end.
Database Setup
We'll use two tables for this application cms_newsletter and cms_users.
cms_newsletter contains three fields:
Column |
Type |
Features |
Id |
bigint |
Primary Key, Identity, Seed 1, Increment 1 |
name |
varchar(60) |
|
varchar(120) |
cms_users is identical to the table used in previous applications. It contains columns of the type varchar, which means they contain text that will hold up to their length, but only what is needed.
I added a basic user called admin with a password of 6868 as test data.
Column |
Type |
Features |
id |
Bigint |
Primary Key, identity, Seed 1, Increment 1 |
cms_user |
varchar(20) |
|
cms_pass |
varchar(20) |
I used SQL server, but you could equally use MS Access if you made the following alterations:
· Change the connection string you'd use to set up the database connection
· Set the id column to autonumber
· Use text instead of varchar for the various text containing fields
Matt Machell
A man of many talents, Matt has been a web designer, technical editor, and jewellery picker. He is currently on contract for the Birmingham City University, producing pages for research centres.
He has tech-edited a dozen books on web design and development for glasshaus, Apress and Sitepoint.
He likes music with loud guitars and games with obscure rules.
His website can be found at: http://www.eclecticdreams.com
He lives in Birmingham with his girlfriend, Frances, and a horde of spider plants.