Created
December 27, 2009 11:57
-
-
Save mrchrisadams/264251 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this file here matches the environment called 'development' | |
# where local development takes place | |
# my understanding here is that values in more specific environment | |
# config files like this should override the shared 'environment.rb' config file | |
# this sets the path, so in messages, we can link to the correct | |
# environment, instead of linking to the production site in every case: | |
config.action_mailer.default_url_options = { :host => "developmentdomain.net" } | |
# this is listed here so when we're sending from the development site, it | |
# looks like we're sending from that site. In theory this should override the | |
# ActionMailer:Base.smtp_settings hash in the shared environments.rb file | |
ActionMailer::Base.smtp_settings = { | |
:domain => 'developmentdomain.net' | |
} | |
# however, when open up the debugger, and the email | |
# ActionMailer::Base.smtp_settings[:domain] will be | |
# listed as 'productiondomain.net' | |
# What's going on here? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this is the main environment.rb in the rails root config directory | |
ActionMailer::Base.smtp_settings = { | |
:address => 'smtp.hostingcompany.com', | |
:port => 25, | |
:domain => 'productiondomain.net', | |
:authentication => :login, | |
:user_name => "productiondomainmailer", | |
:password => "TOP_SEKRIT" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment