title: Return root url when sending ActionMailer email
body: <p>I'm trying to set up my ActionMailer so that it will read the URL it is being posted from. When this application is deployed, it could end up on many different servers with different domain names. Instead of having the user go into the code and force enter the URL statically, I would like the reset password url to include the domain that it was generated from (including http:// or https://).</p>
  
  <p>I've tried <code>::Rails.root</code>, <code>request.host_with_port</code>  and <code>::Rails.root_path</code> within the Mailer, but none have produced results. <code>request.host_with_port</code> generates an undefined method error.</p>
  
  <pre><code>  def reset_password_email(user)
      @user = user
      @url  = "#{::Rails.root_path}/password_resets/#{user.reset_password_token}/edit"
      mail(:to =&gt; user.email,
           :subject =&gt; "Your password has been reset")
    end
  </code></pre>