I have a HTML editor where the admin can enter their content for a HTML email, but for consistent styles between browsers/clients this needs to include inline css. E.g for a paragraph:
Convert:
<p class="standard">
Into:
<p class="standard" style="-ms-text-size-adjust:100%; mso-line-height-rule:exactly; font-family:Helvetica, Arial, sans-serif; font-size:12px; line-height:18px; color:<?php echo $body_font_color; ?>; margin-top:0px; margin-bottom:0px;">
I think this is the same as the popular Mail Chimp works by adding inline styles if they dont exist.
Paragraphs are just example, I also have tables and other classes to add styles into.