13.09.2016 Views

PHP and MySQL Web Development 4th Ed-tqw-_darksiderg

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

30<br />

Building a Mailing List Manager<br />

AFTER YOU’VE BUILT UP A BASE OF SUBSCRIBERS to your website, it’s nice to be able to<br />

keep in touch with them by sending out a newsletter. In this chapter, you implement a<br />

front end for a mailing list manager (MLM). Some MLMs allow each subscriber to send<br />

messages to other subscribers.The program you create in this chapter is a newsletter system,<br />

in which only the list administrator can send messages.The system is named<br />

Pyramid-MLM.<br />

This system is similar to others already in the marketplace.To get some idea of what<br />

we are aiming for, look at http://www.topica.com<br />

Your application lets an administrator create multiple mailing lists <strong>and</strong> send newsletters<br />

to each of those lists separately.This application uses file upload to enable administrators<br />

to upload text <strong>and</strong> HTML versions of newsletters that they have created offline.<br />

This means administrators can use whatever software they prefer to create newsletters.<br />

Users can subscribe to any of the lists at the site <strong>and</strong> select whether to receive<br />

newsletters in text or HTML.<br />

We discuss the following topics:<br />

n File upload with multiple files<br />

n Mime-encoded email attachments<br />

n HTML-formatted email<br />

n Managing user passwords without human interaction<br />

Solution Components<br />

You want to build an online newsletter composition <strong>and</strong> sending system.This system<br />

should allow various newsletters to be created <strong>and</strong> sent to users, <strong>and</strong> allow users to subscribe<br />

to one or many of the newsletters.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!