ryanb / letter_opener

Preview mail in the browser instead of sending.
MIT License
3.73k stars 237 forks source link

May you need change in development.rb #177

Closed marcosmartingm closed 4 years ago

marcosmartingm commented 4 years ago

I lost all the morning with this problem in Rails 6.0.* In config/environments/development.rb you should have:

config.action_mailer.default_url_options = { protocol: 'http', host: 'localhost:3000' }
config.action_mailer.delivery_method = :letter_opener
config.action_mailer.perform_deliveries = true

The first line is very important.

Thanks for the gem

nashby commented 4 years ago

Hey @marcosmartingm! That's weird, it works for me without that line in a new Rails 6.0 app. Could you please try it in a new app as well and see if it's something your app related?

Gonna close it for now. Feel free to ping me to reopen it if you have a way to reproduce this issue.