OSS TanbouSign in with GitHub

Preview development emails in a browser without sending them

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
3,838
Primary language
Ruby
License
MIT
Repository last updated
Apr 25, 2026
On this page

Overview

A Ruby library that intercepts application email, stores it locally, and opens a preview in the browser instead of delivering it externally. Rails applications can switch the Action Mailer delivery method, while Mail and Pony integrations are also documented. It helps developers inspect bodies, subjects, and attachments without risking delivery to a real address.

Features and best fit

Based on official documentation; not hands-on tested · Content checked:

Key features

Replace Rails delivery with a browser preview

After adding the gem to the development group, set delivery_method to :letter_opener in config/environments/development.rb. Messages are saved under tmp/letter_opener by default and opened in the default browser through Launchy instead of being sent.

Sources: [1]

Integrate with mail delivery outside Rails

Mail, Pony, and standalone ActionMailer can select the delivery method and storage location explicitly. The library also exposes settings for the storage location, preview template, and file URI scheme used in environments such as WSL.

Sources: [1]

Best fit

Review templates and attachments during local development

It suits Rails teams that want to inspect notification or authentication email without configuring SMTP or an external mail service. Keeping the message local also reduces the chance of sending development data to a real recipient.

Sources: [1]

Before adoption

Expect a local process that can launch a browser

Launchy assumes the application process can open a browser on the same machine. In Docker, a VM, or a remote server without a browser, use LAUNCHY_DRY_RUN=true and BROWSER=/dev/null to inspect stored output, or choose a receiving tool designed for that environment.

The v1.10.0 changelog states that Ruby 2 support was dropped and Ruby 3.0 or later is supported. The project does not provide a Rails interface for browsing saved mail. Keep the configuration development-only and verify that production delivery settings remain separate.

Sources: [1][2][3][4]

Official sources

  1. [1]Letter Opener v1.10.0 README(2026-10-04)
  2. [2]Letter Opener v1.10.0 changelog(2026-10-04)
  3. [3]Letter Opener v1.10.0 gem specification(2026-10-04)
  4. [4]Letter Opener v1.10.0 MIT license(2026-10-04)
  5. [5]Letter Opener GitHub repository metadata(2026-10-04)
Supplemental curator note

Its strength is quick template review without SMTP. Because it launches a local browser, teams using Docker or remote development should decide how they will inspect stored previews before adopting it.

Try it in 3 steps

  1. 1

    Add the pinned version to an isolated bundle

    Requires Ruby 3.0 or later and Bundler. Mail is added for the documented non-Rails example.

    mkdir letter-opener-demo && cd letter-opener-demo && bundle init && bundle add letter_opener --version 1.10.0 && bundle add mail
  2. 2

    Create a minimal local-delivery script

    Create the documented Mail integration in the same directory. Reserved .test addresses are used, and the delivery method writes locally.

    printf '%s\n' 'require "mail"' 'require "letter_opener"' 'Mail.defaults { delivery_method LetterOpener::DeliveryMethod, location: File.expand_path("tmp/letter_opener", __dir__) }' 'Mail.deliver { from "sender@example.test"; to "recipient@example.test"; subject "Preview"; body "Hello" }' > preview.rb
  3. 3

    Generate and inspect the stored preview

    Suppress browser launch, run the script, and list the preview files written under tmp/letter_opener.

    LAUNCHY_DRY_RUN=true BROWSER=/dev/null bundle exec ruby preview.rb && find tmp/letter_opener -type f -print
Check the official README

Growth

Growth trends · Last 30 days

3,838 Stars

Trend data is still being collected.

Development activity

Last 90 days · weekly

Commits (last 30 days)
0
Open PRs
1

Development activity is still being collected.

Built with

Categories and tags

Categories

GitHub data

GitHub dataView detailed GitHub data
Stars
3,838
Forks
246
Watchers
32
Open issues
1
Contributors
59
Owner type
User
Primary language
Ruby
License
MIT
Repository last updated
Apr 25, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?