🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

resque_mail_queue

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

resque_mail_queue

bundlerRubygems
Version
0.4.0
Version published
Maintainers
1
Created
Source

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

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

  • You do not have to call deliver

  • 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.

FAQs

Package last updated on 14 Jun 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts