Merged trunk r1773.
git-svn-id: http://redmine.rubyforge.org/svn/branches/work@1774 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
1 parent
ab83ed5d8e
commit
a377069fb2
398 files changed
+14736
-5683
No files matched your search
@@ -0,0 +1,17 @@
|
||||
# Loads action_mailer settings from email.yml
|
||||
# and turns deliveries on if configuration file is found
|
||||
|
||||
filename = File.join(File.dirname(__FILE__), '..', 'email.yml')
|
||||
if File.file?(filename)
|
||||
mailconfig = YAML::load_file(filename)
|
||||
|
||||
if mailconfig.is_a?(Hash) && mailconfig.has_key?(Rails.env)
|
||||
# Enable deliveries
|
||||
ActionMailer::Base.perform_deliveries = true
|
||||
|
||||
mailconfig[Rails.env].each do |k, v|
|
||||
v.symbolize_keys! if v.respond_to?(:symbolize_keys!)
|
||||
ActionMailer::Base.send("#{k}=", v)
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user