views:

1458

answers:

5

Does anyone know of a plugin or something that can be used to send bulk emails for a Rails app?

Specifically, I'd like to be able to pass an HTML email file to a rake task or something and have it emailed out to everyone who has signed up to my site and checked the "please send me info about XXX" box.

I wrote kind of a hacked-together version for myself, but I'd like something that throttles itself somewhat smartly and can pick up where it left off if interrupted.

Update: I eventually broke down and got out my credit card and signed up for a real bulk email service, and damn was that the right choice. The resulting emails are very professional, they have built-in analytics, also integrate with Google Analytics, and it's awesome for a ton of other reasons.

If you're looking to do bulk emails with Rails, I would suggest using the Mailchimp service (here's my affiliate link that has a bonus on signup) along with the hominid gem. This will allow you to sync all your user emails from your database to Mailchimp, then use a real bulk service instead of some crappy patched together one.

+1  A: 

Not aware of any plugins for this and I don't know how rake could be used to do this, if at all.

Since you're using Rails, I assume you're using MySQL as your database so this may not be useful to you, but SQL Answers Mail for SQL Server sends bulk email directly from SQL Server. You could try searching for a tool that does something similar for the database you're using.

There's also a tutorial here and here on creating your own mailer.

Serx
+1  A: 

use ActionMailer(tutorial) (docs), it comes with Rails and you should be able to rig it to run from a rake task.

Lolindrath
+1  A: 

I don't know that this is the kind of thing that can be covered by a plugin as there are whole sites/applications dedicated to this kind of thing. If you wanted to use one of those then there is www.campaignmonitor.com, it's pretty good and it has an api that you can hook into from your application.

railsninja
Those sites are also pretty expensive if you have a large user base. It would cost me more than a month's hosting fees to send out a single email.I'm not talking about a full-featured bulk emailer with analytics and such, just a way to easily send a single bulk email.
Micah
Probably on the right track with what you have done then, you could pass the email task to a background job and send it out that way, maybe using starling and workling type solution.
railsninja
After rolling my own, I went back and signed up for Mailchimp. I should have been doing that all along. Don't roll your own!!!
Micah
+2  A: 

I couldn't find one so I wrote it myself. It's not pretty (at this stage), but should serve as a good starting point for anyone with similar needs.

Please send me a pull request if you make any beneficial changes and I'll make sure to give you credit.

Mailcar - Ruby on Rails mass / bulk email plugin

Micah
+1 for roll your own
ADAM
@ADAM, @Micah has now advocated against that and gone with a service. A wise decision I think.
railsninja
+1  A: 

You might want to take a look at postageapp.com

Jack