public
Description: Support for multiple SMTP servers in ActionMailer
Clone URL: git://github.com/nakajima/many-mailers.git
patnakajima (author)
Thu Feb 21 00:20:12 -0800 2008
commit  e857bfdf1ccbfc284cdb2a90e4c6208217237d60
tree    3bdefcbbac65e712c829360689e8e8fa8bb62b45
many-mailers / README
100644 51 lines (37 sloc) 1.154 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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 (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