Railmail
What it is
Rail Mail is a plugin for ruby on rails that gives you a persisted view of any mail your application has sent. It is both a development aid and an administrative helper.
When Railmail is enabled, any mail sent by your application will be trapped and stored in a database table. An interface is enabled within your application where you can view these emails. With railmail there is no need to set up testing email accounts while developing your application; just send out mail to any address and Railmail will capture it.
What it does
- Tracks email that your application sends
- Resends email with new recipients
- Helps you to develop applications that use ActionMailer with no need for an smtp or sendmail setup
- Saves the world
What you have to do to get it
1 - Get the code
script/plugin install http://code.nullstyle.com/git/railmail
2 - Install the DB tables
rake railmail:install
note: you won’t need to do this if you installed railmail using script/plugin
3 - Enable Railmail
Place the snippet below in one of your environment.rb files.config.actionmailer.deliverymethod = :railmail
optionally, the following code will enable pass through for railmail and any messages will actually get sent.
config.afterinitialize do
Railmail::ActionMailer::InstanceMethods.railmailsettings[:passthrough] = :smtp
end
note: the value of :passthrough can be any other ActionMailer delivery method
That’s it! No need to modify your applications code at all.











