]> git.openstreetmap.org Git - rails.git/commitdiff
Put ActionMailer configuration in the right place.
authorTom Hughes <tom@compton.nu>
Sat, 30 May 2009 15:41:23 +0000 (15:41 +0000)
committerTom Hughes <tom@compton.nu>
Sat, 30 May 2009 15:41:23 +0000 (15:41 +0000)
config/initializers/action_mailer.rb
config/initializers/load_configs.rb

index 98b599ce9577c327b02eeb4391c23b5868bb643d..2ccc71ff42a3c5bef8848ec70d75be426ba9bf75 100644 (file)
@@ -1,10 +1,13 @@
-# Configure ActionMailer
+# Configure ActionMailer SMTP settings
 ActionMailer::Base.smtp_settings = {
   :address => 'localhost',
   :port => 25, 
   :domain => 'localhost',
 }
 
+# This will let you more easily use helpers based on url_for in your mailers.
+ActionMailer::Base.default_url_options[:host] = APP_CONFIG['host']
+
 # Monkey patch to fix return-path bug in ActionMailer 2.2.2
 # Can be removed once we go to 2.3
 module Net
index 988f7a7ca4ec0b924dc177cb03eba9ff30298d1c..a189ac8600636b3c79dffa64b26c76b3bf7e9fad 100644 (file)
@@ -2,5 +2,3 @@
 
 # Load application config
 APP_CONFIG = YAML.load(File.read(RAILS_ROOT + "/config/application.yml"))[RAILS_ENV]
-# This will let you more easily use helpers based on url_for in your mailers.
-ActionMailer::Base.default_url_options[:host] = APP_CONFIG['host']