I have an application that works in several environments, that is (development, stage, beta, live)
What is the best way to pass the application domain name when sending mail in order to resolve different domain names depending on the server?
My first thought is to add something to the corresponding environment.rb files for each of them, so config/environments/beta.rb will contain
ActionMailer::Base.smtp_settings[:domain] = 'beta.domain.com'
And config/environments/staging.rb will contain
ActionMailer::Base.smtp_settings[:domain] = 'staging.domain.com'
It seems to me that I'm doing something so that Rails will already have this value, but I did not find it in any of the places that I usually expected, and I can not find it in the documentation.
What is the best approach for this?
source share