Tag Archives: mail

Mail Aggregator Service on CodePlex

I’ve created a new project on CodePlex for ‘Mail Aggregator Service‘ so others can share and contribute if they want to.

There is no dedicated installer yet but installing the service is quite easy as the service exe supports my command line installation options like my other services (i.e. -install command line option).

It can be used with or without QuickMon.

I even have a new project icon/image for the project… mail gator 😉

Mail Aggregator Service update

Just a quick update. I’ve now added a ‘Sql aggregator’ as well. This means there are now 2 ways aggregated messages can be sourced – from text files or Sql server data.

The ‘sql aggregator’ can use any existing table with messages by simply adding a bit field that indicates whether or not the message (in the table) has already been sent or not. The aggregator simply calls one stored proc (or if you want to a plain tsql statement can be used but I don’t recommend it) to retrieve any messages that must be send. This list must contains a message Id, ‘to’ address, subject and a body field. How you get by them combining fields, texts and other stuff is up to the creator of the stored proc. Once sent the ‘sql aggregator’ then calls a second stored proc passing the message Id to mark the message as sent. The sql parameter must be named ‘@Id’ and be an ‘int’.

An example sql script to modify the QuickMon sql notifier table plus two stored procedures are included in the sample project.

Eample source: MailAggregator Source code