Mailing lists can be useful for a variety of purposes. If you have a newsletter that you use to communicate with your customers, chances are you use a mailing list. This article, the first of two parts, will show you how to build a mailing list application.
Building a Mailing List with Borland Delphi (Page 1 of 5 )
A downloadable file for this article is available here.
A mailing list is basically a compilation of names and address, in particular email addresses, that is either stored in a database or bought from some specialist company. It is usually organized around a interest shared by a group of people. For example, if you own a magazine, have subscribers, and want to let the subscribers know about the latest topics, then a mailing list is the way to do it. Spammers use mailing list to sent advertisements about products for their clients (it is highly recommended that you don't do this!).
A mailing list gives you the ability to sent one email to many people at the same time. In our mailing list application we will be able to divide a bunch of email addresses in groups and then sent email messages with attachments to each address in the group.
The mailing list application must do the following:
Send one email message to many users simultaneously.
Create groups of email addresses for those that share the same interest.
Show status reports when sending email messages.
Add and remove addresses
I will be using Borland Delphi's indy components to create the code that will send the email messages, as they are currently well-suited to the task. And I will use an MS Access database to store the email addresses. If you are going to have a couple hundred email addresses, then it is okay to use a small database like MS Access; if it is going to be any bigger, then you should consider using a database server like MS SQL or MySQL, as MS Access will not be able to cope.
MySQL is a free database server and is also very good. At some point I will be writing an article about how to use MySQL with Delphi, which will be helpful to this end. MS SQL is not free; in fact it's quite pricey. So I leave it up to you to decide which you'll use, when deciding how big your mailing list storage requirements are likely to be.