jjolma / many-mailers forked from nakajima/many-mailers
- Source
- Commits
- Network (4)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
master
commit cb665922742d33b2a593a52a4da2f3aac060c9db
tree d411ca3df954cfd4db5887738d9feefce6fb9318
parent 4f55700869ae739348ec1424222667d5098766c9
tree d411ca3df954cfd4db5887738d9feefce6fb9318
parent 4f55700869ae739348ec1424222667d5098766c9
| name | age | message | |
|---|---|---|---|
| |
MIT-LICENSE | ||
| |
README | ||
| |
Rakefile | ||
| |
init.rb | ||
| |
install.rb | ||
| |
lib/ | ||
| |
tasks/ | ||
| |
test/ |
README
ManyMailers
===========
Multiple SMTP servers for ActionMailer.
Example
=======
ProjectMailer.with_settings(:internal) do |mailer|
mailer.deliver_notification(blah)
end
You can also specify servers to use in the event that the initially specified
server fails:
ProjectMailer.with_settings(:internal, :retry => [:backup, :default]) 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. Make sure
it exists.
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

