Forum: Ruby on Rails Best practices for email delivery in production

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Amy Eastwood (Guest)
on 2011-01-15 20:22
(Received via mailing list)
In pre Rails 3 world I was using ar_sendmail to queue up emails. Then
I would setup a cron job every few minutes to deliver the emails. But
that doesn't work perfectly in Rails 3. What is the best way to
deliver emails in production environment in Rails 3?
C1ee3cb97dc26e1131e92592bc833d16?d=identicon&s=25 John Maxwell (jgwmaxwell)
on 2011-01-15 23:50
(Received via mailing list)
Have a look at running some kind of delayed job queue - I use Resque
normally, which I think comes from GitHub. With Resque, and ResqueMailer
(another gem) you can simply "include Resque::Mailer" in your mailers to
have them automatically queued for delivery. Hope that helps.
Paul (Guest)
on 2011-01-16 01:31
(Received via mailing list)
We just set up a daemon
(, which is the same
idea, but it runs inside your app's environment. To send an email from
our app, we just add a row to a table. Then the daemon wakes up every
minute, clears out that table, and sends the email.
Amy Eastwood (Guest)
on 2011-01-16 07:18
(Received via mailing list)
Is there a way to use beanstalkd and stalker to replicate ar_sendmail
E66ceae48943526967c5118011e58b63?d=identicon&s=25 Travis Reeder (treeder)
on 2011-02-10 01:18
(Received via mailing list)
Hi Amy, you might want to try SimpleWorker at ,
great for sending emails (or doing anything in batch) and very easy to
no setup required.

Here's a sample email worker:

This topic is locked and can not be replied to.