title: How do I configure the hostname for Rails ActionMailer?
body: <p>I'm working on a fairly traditional forgot password email - I want to email the user a password change token embedded in a link that they can click on in order to change their password.  I'm emailing via the traditional ActionMailer.</p>
  
  <p>If I use a normal link_to tag</p>
  
  <pre><code>&lt;%= link_to "click here", :controller =&gt; foo, :action =&gt; 'bar', :token =&gt; token %&gt;
  </code></pre>
  
  <p>I get a relative link - rather useless from an email.</p>
  
  <p>If I add in </p>
  
  <p><code>:only_path =&gt; false</code>, then it errors saying I need to set <code>default_url_options[:host]</code>.  The ActionController docs imply that you do that by overriding the #default_url_options methods in your controller.  Surely there's a configuration option to tell Rails what it's hostname is without adding my own config file, parsing it, etc?</p>