Reputation: 163
My entire app is https, no http.
If add the following to any of the views
I get a "edit user" linked to
https://localhost:3000/user/2/edit
But when I place the same line in a mailer view the email contains
http://localhost:3000/user/2/edit
Notice the "http" instead of "https"??
Using
rails 3.0.5 and ruby 1.8.7
Upvotes: 16
Views: 4306
Reputation: 21
Editing my config/environments/development file with
host = "hostaddress.io"
config.action_mailer.default_url_options = { host: host, protocol: 'https' }
worked for me on Rails 4.2.2.
Upvotes: 2
Reputation: 13058
I believe that you have to put in your config/environments/production.rb:
config.action_mailer.default_url_options = {:protocol => 'https'}
Upvotes: 45