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

Posted by 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?
Posted by 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.
Posted by 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.
Posted by 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?
Posted by 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 (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.