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.
Official sources
- [1]Letter Opener v1.10.0 README(2026-10-04)
- [2]Letter Opener v1.10.0 changelog(2026-10-04)
- [3]Letter Opener v1.10.0 gem specification(2026-10-04)
- [4]Letter Opener v1.10.0 MIT license(2026-10-04)
- [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
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
Create a minimal local-delivery script
Create the documented Mail integration in the same directory. Reserved
.testaddresses 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
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
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
Related information
Write a related articleShare a guide or use case for this OSS in Markdown. Articles are published after administrator approval.
Explore next
- graphql-ruby5,444 Stars
2 shared tag(s) · Same language
Define typed GraphQL APIs in Ruby or Rails and execute client queries
Ruby - Jekyll51,707 Stars
1 shared tag(s) · 1 shared category(s) · Same language
generate blog-aware static sites from Markdown and Liquid
Ruby - Homebrew49,884 Stars
1 shared tag(s) · 1 shared category(s) · Same language
manage macOS and Linux software through the
Rubybrewpackage workflow - fastlane42,201 Stars
1 shared tag(s) · 1 shared category(s) · Same language
automate repeatable iOS and Android build, signing, screenshot, and store-release workflows as lanes
Ruby - Vagrant27,211 Stars
1 shared tag(s) · 1 shared category(s) · Same language
define portable development environments across providers with a Vagrantfile
Ruby - Kamal14,628 Stars
1 shared tag(s) · 1 shared category(s) · Same language
deploy Dockerized web apps to bare metal or cloud VMs over SSH and switch traffic with kamal-proxy for zero-downtime releases
Ruby
Report incorrect information
Tell us if any listing information is incorrect or outdated.