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
I believe that you have to put in your config/environments/production.rb:
config.action_mailer.default_url_options = {:protocol => 'https'}
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With