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.

To get to it

When your application is running and Railmail is configured correctly, navigating to /railmail/ will bring you to the main interface. Also, you can add your own custom routes that navigate to the railmail controller and put the interface wherever you want in your URL scheme.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • DZone
  • Digg
  • Reddit
  • del.icio.us
  • Blue Dot
  • StumbleUpon
  • Netscape
  • Ma.gnolia
  • Slashdot
  • Technorati
  • NewsVine
  • Netvouz