Skip to content

Instantly share code, notes, and snippets.

@mrchrisadams
Created December 27, 2009 11:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrchrisadams/264251 to your computer and use it in GitHub Desktop.
Save mrchrisadams/264251 to your computer and use it in GitHub Desktop.
# 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 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