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
To see where the actual script is:
which fakemail
Usage: Rails
# RAILS_ROOT/config/environments/development.rb
config.action_mailer.delivery_method = :sendmail
config.action_mailer.sendmail_settings = {:location => "PATH_TO_FAKEMAIL"}
Restart the app, and its ready to go.
Usage: Pony
Pony.mail(
:via => :sendmail,
:via_options => {
:location => 'PATH_TO_FAKEMAIL',
}
)