Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
M

mail_view

> 编程语言
Open source

Visual email testing

1.3K stars0 likes5 views
WebsiteGitHub

About

Visual email testing

MailView -- Visual email testing

Preview plain text and html mail templates in your browser without redelivering it every time you make a change.

Rails 4.1

NOTE: MailView is part of Rails 4.1+. No need for the plugin anymore!

  • 4.1.0 API docs: http://api.rubyonrails.org/v4.1.0/classes/ActionMailer/Base.html#class-ActionMailer::Base-label-Previewing+emails
  • Release notes: http://edgeguides.rubyonrails.org/4_1_release_notes.html#action-mailer-previews
  • Pull request: https://github.com/rails/rails/pull/13332/files

Install

Add the gem to your Gemfile:

ruby
  gem 'mail_view', :git => 'https://github.com/basecamp/mail_view.git'
  # or
  gem "mail_view", "~> 2.0.4"

And run bundle install.

Usage

Since most emails do something interesting with database data, you'll need to write some scenarios to load messages with fake data. Its similar to writing mailer unit tests but you see a visual representation of the output instead.

ruby
  # app/mailers/mail_preview.rb or lib/mail_preview.rb
  class MailPreview  'mail_view'
  end

Now just load up http://localhost:3000/mail_view.

Interface

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Ruby

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言