public
Description: Support for multiple SMTP servers in ActionMailer
Clone URL: git://github.com/nakajima/many-mailers.git
nakajima (author)
Wed Mar 05 11:00:12 -0800 2008
commit  9bd940d12d260be40e147f11c37ee0139ed1ed13
tree    0d1623fe255e7e8c3eb7b601f506d5648c4392bb
parent  cec5156dc6d0dd50a91b9d5a76925757c1fdbdb7
name age message
file MIT-LICENSE Thu Feb 21 00:20:12 -0800 2008 added many_mailers to plugin repos [patnakajima]
file README Thu Feb 21 18:29:08 -0800 2008 updated README doc [patnakajima]
file Rakefile Thu Feb 21 00:20:12 -0800 2008 added many_mailers to plugin repos [patnakajima]
file init.rb Thu Feb 21 00:20:12 -0800 2008 added many_mailers to plugin repos [patnakajima]
file install.rb Thu Feb 21 00:20:12 -0800 2008 added many_mailers to plugin repos [patnakajima]
directory lib/ Wed Mar 05 10:44:51 -0800 2008 restructured many_mailers [patnakajima]
directory tasks/ Thu Feb 21 00:20:12 -0800 2008 added many_mailers to plugin repos [patnakajima]
directory test/ Wed Mar 05 11:00:12 -0800 2008 cleaned up test directory [nakajima]
README
ManyMailers
===========

Multiple SMTP servers for ActionMailer.

Example
=======

  ProjectMailer.with_settings(:internal) do |mailer|
    mailer.deliver_notification(blah)
  end

USE
===

Create a YAML file in your config directory named "mail_servers.yml" Put
your mail settings in there like so (see mail_servers.yaml in this plugin's 
test directory for a better example):

  |default:
  |  address: mail.example.com
  |  port: 25
  |  domain: example.com
  |  user_name: test_user
  |  password: test_password
  |
  |internal:
  |  address: internal.example.com
  |  port: 25
  |  domain: example.com
  |  user_name: test_user
  |  password: test_password
    
The plugin will look for a server named "default" to use by default. 
To specify the default server, do this: 

  ActionMailer.default_server = :internal

ActionMailer::Base (and all of its subclasses, ie, your mailers) will use this
server by default.

TODO
====

* Per-mailer settings (non-global)
* ActionMailer::Base#with_settings shouldn't modify SMTP settings for other
  mailers besides the one that called it.
  

Copyright (c) 2008 Animoto Productions, released under the MIT license