Virtual Mails

Build Status Coverage Status

A rails plugin that provides a virtual mail box and action mailer delivery method. You can send mail to this virtual mail box instead of real email service in development environment, and you can preview the emails in this virtual mail box in web page.

image
image

Installation

Add this line to your application's Gemfile:

gem 'virtual_mails', group: :development

Make sure you have:

gem 'jquery-rails'

And then execute:

bundle

Route

Add virtual mail box route in your config/route.rb

mount VirtualMails::Engine => "/virtual_mails" if Rails.env.development?

Delivery Method

Set up delivery method of action mailer in your config/environments/developmnet.rb

config.action_mailer.delivery_method = :virtual

Usage

Now, you can go to http://localhost:3000/virtual_mails and check the emails!

Rails 5

You have to enable caching in development in Rails 5

rails dev:cache

License

The gem is available as open source under the terms of the MIT License.

Contact

The project's website is located at https://github.com/emn178/virtual_mails
Author: Chen, Yi-Cyuan ([email protected])