Skip to content

Instantly share code, notes, and snippets.

@sdickey
Created June 10, 2014 04:33
Show Gist options
  • Select an option

  • Save sdickey/401d26cefec4054ced63 to your computer and use it in GitHub Desktop.

Select an option

Save sdickey/401d26cefec4054ced63 to your computer and use it in GitHub Desktop.

Revisions

  1. sdickey created this gist Jun 10, 2014.
    23 changes: 23 additions & 0 deletions letter_opener.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    # What is letter_opener?

    A gem that allows you to preview emails in the browser instead of sending them. This is ideal for testing email delivery in your development environment, eliminating (or at least significantly reducing) the possibility of accidentally sending a test email to a live email address.

    # Installation instructions

    Add the gem to your development environment:

    ```ruby
    gem "letter_opener", :group => :development
    ```

    Set the delivery method in config/environments/development.rb

    ```ruby
    config.action_mailer.delivery_method = :letter_opener
    ```

    Add the letter_opener gem to your gemfile and bundle install.

    Now any emails sent in your development environment in rails will pop up in your browser instead of being delivered to the actual email address specified. The messages are stored in tmp/letter_opener.

    Pretty simple gem.