Chapter 30 Building a Mailing List Manager
Specifically,the requirements for this system are
Administrators should be able to set up and modify mailing lists.
Administrators should be able to send text and HTML newsletters to all the sub-
scribers of a single mailing list.
Users should be able to register to use the site, and enter and modify their details.
Users should be able to subscribe to any of the lists on the site.
Users should be able to unsubscribe from lists they are subscribed to.
Users should be able to store their preference for either HTML-formatted or
For security reasons,users should not be able to send mail to the lists or to see
each other’s email addresses.
Users and administrators should be able to view information about mailing lists.
Users and administrators should be able to view past newsletters that have been
sent to a list (the archive).
A number of components are needed to fulfill the requirements.The main ones are set-
ting up a database of lists,subscribers,and archived newsletters;uploading newsletters
that have been created offline; and sending mail with attachments.
Setting Up a Database of Lists and Subscribers
In this project,you track the usernames and passwords of all system users, as well as a list
of the lists they have subscribed to.You also store each user’s preference for receiving text
or HTML email so that you can send a user the appropriate version of the newsletter.
An administrator is a specialized user with the ability to create new mailing lists and
send newsletters to those lists.
A nice piece of functionality to have for a system like this is an archive of previous
newsletters.Subscribers might not keep previous postings but might want to look up
something.An archive can also act as a marketing tool for the newsletter because poten-
tial subscribers can see what the newsletters are like.
You will find nothing new or difficult in setting up this database in MySQL and an
interface to it in PHP.
Using File Upload
You need an interface to allow the administrator to send newsletters,as mentioned pre-
viously.What we haven’t discussed is how the administrator will create that newsletter.