Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Plugin that provides mail queueing functionality on top of merb-mailer
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
.gitignore
LICENSE
README
Rakefile
TODO
merb_mail_queue.gemspec

README

merb_mail_queue
===============

A plugin for the Merb framework that provides mail queueing functionality.
Instead of sending emails right away, this plugin queues them into database
table and provides simple processor that loads queue and does send out in the
background.

Setup
===============

Add dependencies in your init file like this:

dependencies "merb-mailer", "merb_mail_queue"


Set up configuration and load plugin in after_app_loads hook. This plugin has
two configuration options: adapter name (only ActiveRecord is supported at the moment)
and mail queue job model class name. So it may look like this in the end.

Queue processor assumed to use your application mailer configuration.

Merb::BootLoader.after_app_loads do
  Merb::Plugins.config[:merb_mail_queue] = {
    :mail_queue_job_model_class_name => "MailQueueJob",
    :adapter                         => :activerecord
  }
  
  Merb::MailQueue.load_plugin!
  
  Merb::Mailer.config = {
    :host   => 'mail.your-domain.com',
    :port   => '25',
    :user   => 'webmaster',
    :pass   => 'supersecret',
    :auth   => :plain, # :plain, :login, :cram_md5, the default is no auth
    :domain => "your-domain.com" # the HELO domain provided by the client to the server
  }
end
Something went wrong with that request. Please try again.