simpleweb/mails_viewer

Name: mails_viewer

Owner: Simpleweb

Description: MailsViewer is a Rails engine to let you easily view and send mails in non-production environment.

Created: 2013-06-17 17:29:38.0

Updated: 2013-06-17 17:43:24.0

Pushed: 2013-06-17 17:43:24.0

Homepage: http://pragmaticly.github.com/mails_viewer/

Size: 569

Language: Ruby

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

MailsViewer

MailsViewer is a mails preview Engine which provides a table view for all mails under tmp/mails. So you can easily preview the mails in non-production mode and no longer need to worry about accidentally sending a test email to someone else?s address.

MailsViewer is a fork of tomlion's original code and I'm glad to be the maintainer; thanks go to him for getting this thing started!

REQUIREMENT Usage

Add the gem to your Gemfile :

"mails_viewer"

Set ActionMailer's delivery method to :file :

ig.action_mailer.delivery_method = :file

put this in your routes.rb:

t MailsViewer::Engine => '/delivered_mails'

Now just load up http://localhost:3000/delivered_mails

Advanced

You can choose to send out some mails to the inbox instead of just storing them in the file system by specifying which mails to sent:

ig.action_mailer.delivery_method = :file
ig.action_mailer.file_settings = {
cation: 'tmp/mails',
tp_settings: {
address:              "localhost",
port:                 25,
domain:               'localhost.localdomain',
user_name:            nil,
password:             nil,
authentication:       nil,
enable_starttls_auto: true

nd_if: lambda { |mail| mail.destinations.select { |address| ["yedingding@gmail.com"].include?(address) }.any? }

Now any mails sent to yedingding@gmail.com will not only store in the filesystem for you to browse later, but also send out to his inbox.

Credits

pragmatic.ly

MailsViewer is maintained by Pragmatic.ly.

Special thanks to tomlion for starting the project.

Copyright (c) 2012 Dingding Ye, Pragmatic.ly (dingding@pragmatic.ly, https://pragmatic.ly/)


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.