title: Converting External CSS to Inline CSS for Mail in Rails
body: <p>I am trying to create an application that will send out style-heavy emails and have required clients working except Google's Gmail. I researched the issue and it looks like Gmail strips out CSS from external files or CSS nested in the 'style' tag. Does an easy way exist of moving style from an external file to being inline?</p>
  
  <p>Something that will take:</p>
  
  <pre><code>&lt;style&gt;
  .wide { width: 100px; }
  .cell { display: block; }
  &lt;/style&gt;
  &lt;span class="wide cell"&gt;Sample&lt;/span&gt;
  </code></pre>
  
  <p>And convert it to:</p>
  
  <pre><code>&lt;div class="wide cell" style="width: 100px; display: block;"&gt;Sample&lt;/div&gt;
  </code></pre>
  
  <p>Thanks!</p>