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

50e0c473325db72d81d1b77b034f70ce?d=identicon&s=25 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.
Cca068efe0c9f8f5853069c1fa211e56?d=identicon&s=25 Paul (Guest)
on 2011-01-16 01:31
(Received via mailing list)
We just set up a daemon
(http://railscasts.com/episodes/129-custom-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.
50e0c473325db72d81d1b77b034f70ce?d=identicon&s=25 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
functionality?
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
http://www.simpleworker.com ,
great for sending emails (or doing anything in batch) and very easy to
use,
no setup required.

Here's a sample email worker:
http://support.simpleworker.com/kb/sample-workers/...

Travis
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.