Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to define a host with https in action_mailer.default_url_options

ActionMailer provides a way to define the host to use with resource helpers:

config.action_mailer.default_url_options = { :host => "example.com" } 

I can't find a way to force this to https.

like image 506
m33lky Avatar asked Feb 27 '12 04:02

m33lky


Video Answer


1 Answers

All you have to do it add "protocol" to the default url options:

config.action_mailer.default_url_options = { :host => 'example.com', :protocol => 'https'} 

Dazpinto was right - linking to a duplicate question with the answer: Rails mailer edit_user_url uses http not https

like image 130
benrugg Avatar answered Sep 27 '22 23:09

benrugg