<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Yup Dot Com: Archiving your Sent Mail with the RailMail Plugin</title>
    <link>http://www.yup.com/articles/2006/06/03/the-railmail-plugin-archiving-your-sent-messages</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Advanced Web Services</description>
    <item>
      <title>Archiving your Sent Mail with the RailMail Plugin</title>
      <description>&lt;p&gt;&lt;img style="float: right; border: 1px dotted #ccc; margin: 4px; padding: 4px;" src="http://static.flickr.com/51/150892964_d7e5742c4a_m.jpg" /&gt;Scott Fleckenstein of &lt;a href="http://rubyredlabs.com/"&gt;Rubyred Labs&lt;/a&gt; has announced the release of RailMail, a Ruby on Rails plugin that, &amp;#8220;traps any mail sent through ActionMailer (when the delivery_method is set to :railmail), stores it in a database, and provides an interface to view those messages.&amp;#8221;&lt;/p&gt;

&lt;p&gt;Once installed into your app using &lt;code&gt;script/plugin install http://hg.nullstyle.com/raw/railmail&lt;/code&gt;, enable it in your &lt;code&gt;environment.rb&lt;/code&gt; file:&lt;/p&gt;

&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="ident"&gt;config&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;action_mailer&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;delivery_method&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="symbol"&gt;:railmail&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;To log messages &lt;i&gt;and&lt;/i&gt; pass them through a SMTP mailer, add the following code &lt;/p&gt;

&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_ruby "&gt;&lt;span class="ident"&gt;config&lt;/span&gt;&lt;span class="punct"&gt;.&lt;/span&gt;&lt;span class="ident"&gt;after_initialize&lt;/span&gt; &lt;span class="keyword"&gt;do&lt;/span&gt;
  &lt;span class="constant"&gt;Railmail&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;ActionMailer&lt;/span&gt;&lt;span class="punct"&gt;::&lt;/span&gt;&lt;span class="constant"&gt;InstanceMethods&lt;/span&gt;&lt;span class="punct"&gt;.\&lt;/span&gt; 
    &lt;span class="ident"&gt;railmail_settings&lt;/span&gt;&lt;span class="punct"&gt;[&lt;/span&gt;&lt;span class="symbol"&gt;:passthrough&lt;/span&gt;&lt;span class="punct"&gt;]&lt;/span&gt; &lt;span class="punct"&gt;=&lt;/span&gt; &lt;span class="symbol"&gt;:smtp&lt;/span&gt; 
&lt;span class="keyword"&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Simple concept, easy implementation, big results.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://railmail.nullstyle.com/"&gt;RailMail Home Page&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://blog.nullstyle.com/index.php/2006/05/30/introducing-rail-mail/"&gt;Blog Post about RailMail&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://agilewebdevelopment.com/plugins/rail_mail"&gt;RailMail at the Rails Plugins Directory&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Sat, 03 Jun 2006 06:12:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:d06f2bb0-e738-41c9-be3d-b92ec6dad5bd</guid>
      <author>Daniel Butler</author>
      <link>http://www.yup.com/articles/2006/06/03/the-railmail-plugin-archiving-your-sent-messages</link>
      <category>Ruby on Rails</category>
      <category>mail</category>
    </item>
  </channel>
</rss>
