We have a number of customers that we have to send monthly invoices too. Right now, I'm managing a codebase that does SQL queries against our customer database and billing database and places that data into emails - and sends it.
I grow weary of maintaining this every time we want to include a new promotion or change our customer service phone numbers. So, I'm looking for a replacement to move more of this into the hands of those requesting the changes.
In my ideal world, I need :
- A WYSIWYG (man, does anyone even say that anymore?) email editor that generates templates based upon the output from a Database Query.
- The ability to drag and drop various fields from the database query into the email template.
- Display of sample email results with the database query.
- Web application, preferably not requiring IIS.
- Involve as little code as possible for the end-user, but allow basic functionality (i.e. arrays/for loops)
- Either comes with it's own email delivery engine, or writes output in a way that I can easily write a Python script to deliver the email.
- Support for generic Database Connectors. (I need MSSQL and MySQL)
- F/OSS
So ... can anyone suggest a project like this, or some tools that'd be useful for rolling my own?
(My current alternative idea is using something like ERB or Tenjin, having them write the code, but not having live-preview for the editor would suck...)
You could easily write something on your own.. give them a basic edit control and allow them to use psuedo variables like {customername} {anothercustomerattribute} within the mail body.
On submit either send directly or save as template. When the template is sent away the script automatically parses stuff like {customername} into the real customers name from the database.
Your own very very simple custom scriptlanguage :)
Everything else like loops and so on would be maintained on serverside. And if you want particular groups of customers to receive the letter, allow the enduser to select from selectboxes or whatever and do the rest on the serverside with pre-defined rules.
I think your looking for a reporting tool which is also capable of sending email. Sending a generared report in html or pdf shouldn't be to hard to do as well. I've used JasperReports in the past for which I think it should fit your needs. Another good solution is the pentaho reporting tool