Sendmail replacement to debug email output, layouts, etc.
Ruby
Latest commit 947ac7d Nov 28, 2011 @sosedoff Update README.rdoc
Permalink
Failed to load latest commit information.
bin make it a gem Sep 18, 2011
lib make it a gem Sep 18, 2011
README.rdoc Update README.rdoc Nov 28, 2011
fakemail.gemspec make it a gem Sep 18, 2011

README.rdoc

Fakemail

Fakemail is a simple sendmail replacement made for debugging/inpection purposes.

Features

  • Works in any Ruby app (Rails/Mer/Sinatra)

  • Stores each email as 2 files: headers and content.

  • Both text and html formats are supported.

Installation

Install as a gem:

gem install fakemail

Usage

Add gem dependency to your Gemfile:

group :development do
  gem 'fakemail'
end

To see where the actual script is:

which fakemail

Usage: Rails

Edit your development environment file config/environments/development.rb:

config.action_mailer.delivery_method = :sendmail 
config.action_mailer.sendmail_settings = {:location => `which fakemail`.strip}

Restart the app, and its ready to go.

Usage: Pony

Pony.mail(
  :via => :sendmail,
  :via_options => {
    :location  => 'PATH_TO_FAKEMAIL',
  }
)