f you're a developer, chances are that you're no stranger to mailing lists. A mailing list contains a group of users who are subscribed to receive regular emails pertaining to a specific topic. Usually, the process is automated—you send an email requesting to be added to a list, and to unsubscribe, you send another email. Mailing lists are often managed by list server software, which you can either buy or purchase as a service.
This article demonstrates how to build your own mailing list server, making use of the new classes located in the System.Net.Mail
namespace in .NET 2.0, as well as some techniques to retrieve emails from Outlook.
For a mailing list server to work, you need to be able to:
- Send messages to list members
- Receive subscription/unsubscription email requests from users
- Automate the process of adding and removing users.
Sending emails is easy with the System.NET.Mail
namespace. However, it's important to realize that this namespace only allows you to send emails; retrieval of emails is not supported. Hence, I'll show you how to overcome this limitation by "talking" to Outlook instead.