github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

langalex / workling_mailer

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 57
    • 6
  • Source
  • Commits
  • Network (6)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Send Emails via ActionMailer asynchronously using starling and others via workling — Read more

  cancel

http://upstream-berlin.com/blog/open-source/#workling_mailer

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

updated the readme 
Alexander Lang (author)
Tue May 20 11:13:59 -0700 2008
commit  d0b1c7511346774193e0d8ebfefb54427ff06f63
tree    a98c14f69e9ed68ea830e6ed115f7226aa7e83b7
parent  6b3dc23da4b4e36fd972f06b08595b6a667ca996
workling_mailer /
name age
history
message
file MIT-LICENSE Mon May 19 04:35:46 -0700 2008 first commit [Alexander Lang]
file README Tue May 20 11:13:59 -0700 2008 updated the readme [Alexander Lang]
file init.rb Tue May 20 11:10:00 -0700 2008 switched from dynamically generating workers to... [Alexander Lang]
directory lib/ Tue May 20 11:10:00 -0700 2008 switched from dynamically generating workers to... [Alexander Lang]
directory spec/ Tue May 20 11:10:00 -0700 2008 switched from dynamically generating workers to... [Alexander Lang]
README
WorklingMailer
==============

This plugin provides a module which - when included into an ActionMailer subclass - pushes all emails that would 
normally be delivered synchronously into a queue for asynchronous processing. For queuing it relies on the workling 
plugin (http://github.com/purzelrakete/workling) which can use for example twitter's starling as a queue server.

How it works
============

The plugin provides a module AsynchMail. To make a mailer use a queue simply include it into the class like this:

class MyMailer < ActionMailer::Base
  include AsynchMail
end

From now on all MyMailer.deliver_whatever_email calls create an entry in the MailerWorker.deliver_mail corresponding 
queue and should be processed by a worker. If you still want to deliver mail sycnhronously add a bang to the method 
call: MyMailer.deliver_whatever_email!

Installation
============

If you are on rails edge (which supports git) you can simply do a 
script/plugin install git://github.com/langalex/workling_mailer.git

If not you need to do this from your rails root:

cd vendor/plugins
git clone git://github.com/langalex/workling_mailer.git --depth 1
cd ../../..

Credits
=======

Parts of the code (the method_missing implementation) were taken from the mail_queue plugin 
(http://code.google.com/p/mail-queue/) which queues emails in a database table.

Contact
=======

Copyright (c) 2008 Alexander Lang, released under the MIT license

Contact: email: alex[at]upstream-berlin.com, twitter: langalex, blog: http://upstream-berlin.com/blog, skype: langalex
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server