Preview mail in the browser instead of sending.
Ruby
Switch branches/tags
Nothing to show
Pull request Compare This branch is 227 commits behind ryanb:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
spec
.gitignore
.rspec
.rvmrc
Gemfile
README.rdoc
Rakefile
letter_opener.gemspec

README.rdoc

Letter Opener

Preview mail in your browser instead of sending it. When using the included delivery method, any sent mail will open automatically into the browser.

Rails Setup

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 delivered mail will pop up in your browser. The messages are stored in tmp/letter_opener.

Other Setup

This can be used with anything that uses the Mail gem. Simply set the delivery method when configuring Mail and specify a location.

require "letter_opener"
Mail.defaults do
  delivery_method LetterOpener::DeliveryMethod, :location => "tmp/letter_opener"
end

Development & Feedback

Questions or comments? Please use the issue tracker. If you would like to contribute to this project, clone this repository and run bundle and rake to run the tests.

Special thanks to the mail_view gem for inspiring this project and for their mail template.