Need an auto-emailer, but not for spam
May 1, 2008 4:56 AM   Subscribe

Are there any open source/freeware auto emailers out there? No, it's not for spam...

I have a client who is developing a product wherein paying customers receive emails on a set schedule that they themselves control. The emails will contain reminders about certain things. Without getting any more specific (sorry, but it is a new product), is there an open-source program that can send emails with the following criteria:

- Send emails that have been pre-written
- Send emails on a scheduled basis to people
- Have different schedules for sending to different people


Right now, since we're just in the initial planning stages, it isn't critical that people be able to set their own schedules for having emails sent to themselves. When that time comes, we'll probably get a web monkey to build a PHP-type solution for that. (Bonus question: any recommendations for what we use for this?) Right now, though, we need to do some testing with some software that we'll configure the schedules for ourselves.

Thanks!
posted by omnipotentq to Computers & Internet (4 answers total)
 
exim and a cron job?
posted by mattoxic at 5:51 AM on May 1, 2008


ok chron
posted by mattoxic at 5:51 AM on May 1, 2008


Every minute, in a SQL database, "SELECT id, message, recipient FROM scheduled WHERE due < now() AND NOT EXISTS (SELECT 1 FROM sent_record WHERE sent.id=scheduled.id)".

Then, when you send each, add it to the sent_record table.


Alternatively, just use I Want Sandy.
posted by cmiller at 6:52 AM on May 1, 2008


this sort of mailing task is typically too small for there to be an 'open source' solution, because the time you would spend integrating that solution with your application/user database is about the same amount of time it would take to write a script to do it. I can't offhand think of any mail solutions for this, and I can say from experience that the open source bulk mailing options are very few -- it's the type of service many people are willing to pay for. that does not mean it's not out there, and perhaps someone else will be able to chime in with a viable solution. as far as roll-your-own goes, cmiller's suggestion is generally how i've seen this handled.

However, giant caveat: you have to consider that a cron job running every minute is not going to scale well if you have more than a dozen users getting emails on any particular scheduling run. You need at the very least a mutex to prevent a cron job from re-running while it is already being processed, and need to consider what happens if the process times out while you are running it (in theory it should pick up those 'skipped' users next time it runs, but you need to be careful with the way it's coded to make sure of this).

it's really hard to give you better advice without understanding what you are using to run the rest of the logic. For the kind of prototyping situation where you seem to be, I think it can be very beneficial to pick up an off-the-shelf CMS and combine it with a few plugins to see what you get. It's not going to do what you want perfectly, but it should be good enough for a proof of concept and a demo.
posted by fishfucker at 10:31 AM on May 1, 2008


« Older This can't be happening..   |   FlimsiestExcusePossibleFilter Newer »
This thread is closed to new comments.