Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sidekiq-mailer

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sidekiq-mailer

  • 0.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Sidekiq::Mailer

This gem lets you send mail in the background using Sidekiq.

Installation

Add the gem to your Gemfile:

gem 'sidekiq-mailer'

If you're using Bundler 1.0, you'll need to tell Bundler the library file name:

gem 'sidekiq-mailer', :require => 'sidekiq/mailer'

Usage

Install into your mailer:

class BackgroundMailer < ActionMailer::Base
  extend Sidekiq::Mailer

  # optional queue name
  # queue :mail

  def send_mail(record)
    mail :to => record.email
  end
end

Queue mail jobs using the DelayedJob background mail style:

BackgroundMailer.delay.send_mail(record)

To actually your mail, run sidekiq. If you set your mail queue name to "mail", run sidekiq -q mail instead.

Caveats

Right now, it only expects a single ActiveRecord instance as the argument passed to whatever email method you call. This could become a problem in the future, but it's working for me. If it's a problem for you, see the next section. :)

Contributing

Please do, pull requests happily discussed and accepted.

FAQs

Package last updated on 17 Feb 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc