I've an application which has expires inside a couple of conditions i.e. (development, staging, beta, live)
What's the easiest method to pass within an app's domain title when delivering mail, to permit different domains with respect to the server?
My first thought would be to add something within the particular atmosphere.rb files for every one, so
config/conditions/beta.rb would contain
ActionMailer::Base.smtp_configurations[:domain] = 'beta.domain.com'
config/conditions/staging.rb would contain
ActionMailer::Base.smtp_configurations[:domain] = 'staging.domain.com'
This feels as though I am doing something so fundamental that Rails would curently have this value laying around, however i haven't thought it was most of the places I'd normally expect, nor can one think it is within the documentation.
What's a great way to consider here?
It's my job to just pass the need for
request.host to the ActionMailer method.
Inside your atmosphere files, you need to set:
If you are using url_for rather than named routes, you should also specify :only_path => false ... so you do not get relative web addresses. I generally use named routes, however.