We're academic researchers running a new two-part survey study. We need a Ruby program that will enable us to automatically email our study participants links to their surveys. Our research partners have a MySQL database with user information, and we need to use that info to send emails.
We need to do the following:
1. Periodically copy data from an existing MySQL database to ours (user information)
2. Email new user entries the 1st survey link the day they sign up
3. Email reminder to people who haven't responded to the first survey after a week
4. Email people who completed the first survey with 2nd survey link a month later
The code must be able to run on a *NIX system. We'll either be using a Linux VM from Amazon or a site hosted by Dreamhost to host the program. We require original (i.e., not compiled) code so that we can make changes to the program. For instance, your code should allow us to set config variables for the database from which to copy info, the database we copy info to, and accept templates for the email. An email might look something like
Thanks for volunteering! Here's the link to your survey: http://surveylink/uid=[USERID]
Where  indicate a variable from the database.