public
Description: Plugin that provides mail queueing functionality on top of merb-mailer
Homepage:
Clone URL: git://github.com/lachie/merb_mail_queue.git
name age message
file .gitignore Loading commit data...
file LICENSE
file README
file Rakefile
file TODO
directory lib/
file merb_mail_queue.gemspec
directory spec/
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