I need to build a url in my mails view. For restfull resources I can use
routing and "..._url" target. But for custom url I don't know how I
get the hostname of my web app.
I didn't know how I can get get the value specified on
config.action_mailer.default_url_options = {:host =>
"here_my_host_i_want_get" }
What I would do is pass it in on your mailer method… you can get the host name in your controller: request.host. I see action mailer as a model essentially so you should not couple it to the session.