Action Mailer host
Set host depending on current request. Set a beforefilter on your applicationcontroller
beforefilter :setmailer_host
private
def set_mailer_host
ActionMailer::Base.default_url_options[:host] = request.host_with_port
end
Written by Luis Guzman
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#