m33lky
m33lky

Reputation: 7275

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.

Upvotes: 30

Views: 11033

Answers (1)

benrugg
benrugg

Reputation: 2094

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

Upvotes: 70

Related Questions