TamTam: Inline CSS

Email services like GMail and Hotmail don't like stylesheets. The only way around it is to use inline styles. Replacing stylesheet references with inline styles is painful. Use TamTam to do the dirty work for you.

Grab the Gem: gem install tamtam -y

Install the Plugin: script/plugin install http://tamtam.rubyforge.org/svn/plugins/inline_css

Dependencies: Hpricot

Using the Gem:

require 'rubygems'
require 'tamtam'

inlined = TamTam.inline(
  :css => '.foo { color: blue; }',
  :body => '<div class="foo">bar</div>'
)
puts inlined # <div class="foo" style="color: blue;">bar</div>

Using the Plugin: Send HTML email and watch the CSS inline auto-magically!

More info via the Project Page.
Brought to you by Dave Hoover and Brian Tatnall of Obtiva Corp. Sponsored by MadMimi.com.