I downloaded a project from github that has a mailer when deployed to production, but on my own local copy the mailer doesn't work. How do I setup mail locally for development so that I can test it?
Asked
Active
Viewed 4,698 times
7
-
2Possible duplicate of http://stackoverflow.com/questions/5286009/actionmailer-and-development-mode-can-it-write-to-a-file-or-something. – Brian Donovan Nov 20 '11 at 20:17
4 Answers
9
You can use letter_opener gem by Ryan Bates

Andrey Kryachkov
- 891
- 4
- 14
-
thanks, i liked this one the most from the answers provided. I personally ended up using the answer in the duplicate question here http://stackoverflow.com/questions/5286009/actionmailer-and-development-mode-can-it-write-to-a-file-or-something as it didn't need me to install anything, but this would be my second option. – GiH Dec 07 '11 at 06:11
4
You don't need a gem.
In:
config/environments/development.rb
Set
Rails.application.configure do
config.action_mailer.delivery_method = :file
end
Then look for the mails in
PROJECT_ROOT/tmp/mails/email@example.com

FreePender
- 4,770
- 2
- 18
- 15