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.