Jackson Henley
Jackson Henley

Reputation: 1531

What mail service/server to use while in dev mode in Rails?

It does not seem that SendGrid has a free account that one could use to test in development mode. What are the current alternatives/best practices for this?

Upvotes: 0

Views: 103

Answers (1)

Jeremy Peterson
Jeremy Peterson

Reputation: 666

One good option is using the letter_opener gem. See https://github.com/ryanb/letter_opener

First add the gem to your development environment and run the bundle command to install it.

gem "letter_opener", :group => :development

Then set the delivery method in config/environments/development.rb

config.action_mailer.delivery_method = :letter_opener

Now any email will pop up in your browser instead of being sent. The messages are stored in tmp/letter_opener.

Upvotes: 1

Related Questions