This project is read-only.
Project Description
This project introduces a simple windows service that can be used to build email notification intrastructure to handle all the email or other notification need for your applications and systems.

The main program runs as a simple windows service. The solution works in publish/subscribe pattern. All the client applications or systems that need to send email or other notifications will simply publish their 'Events' by writting the event and related information into an 'event' table, then multiple 'subscribers' can be configured in the configuration file of the service program by specifying the database/table of the event table, the event category they subscribe, email address/subject etc., as well as the location of the email template file used to merge the event data. The service program will query the specified event tables in a given interval and process the notification according to the subscriber configuration.

I included a setup SQL script for creating a sample 'event' table, but you can create your own event tables to publish and store events, as long as a few common columns exist in the table. The program merges the event record to the email body and subject line template, specified in the service configuration and template file, by replacing the FIELDNAME tags with field value in your records. A sample body template was also included under the project folder.

It's quite simple but effective, handles all the need to send email notifiation in all programs. We can simply add notification feature to existing programs with a few lines of sql scripts. No need to configure and manage SMTP in individual applications and websites, and all recipient and other email configuration are now centrally managed.

The solution may be enhanced with DI framework, probably unity, to allows other notification methods other than SMTP or other query methods to be configured for different subscribers.

Last edited Mar 16, 2012 at 5:47 AM by boguan, version 5