No release in over 3 years
Low commit activity in last 3 years
Simple asynchronous emails with Resque
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

>= 1.1.0
 Project Readme

Resque Mail Queue

This gem makes it very easy to send emails asynchronously with Resque.

Usage

Add the gem to your gemfile:

gem 'resque_mail_queue' 

Then anytime you want to push an email asynchronously add enqueue before the mailer method.

UserMailer.enqueue.welcome_email(1)

Notes

  1. As with most things Resque, your parameters should be simple objects (ids, strings, etc). Or put another way, do not pass your models directly.

  2. You do not have to call deliver

  3. By default, all messages will be placed on a queue called "mail". You can change this by adding a class method called queue on any mailer.

    class MyMailer < ActionMailer::Base

     def self.queue
     	:high_priority
     end
    

    end

Why use this instead of ResqueMailer

I initially started using ResqueMailer and it worked well. However, I preferred being more explicit (and simple) on when emails were sent asynchronously (by calling enqueue).

More clearly, if ResqueMailer works for you and you like it, stick with it.

License

Provided under the Do Whatever You Want With This Code License.