Python HTML email : customizing output color-coding
<p>I am trying to send a python (2.6) HTML email with color coded output. My script creates an output string which I format to look like a table (using str.format). It prints okay on the screen:</p>

<p>abcd 24222 xyz A<br>
abcd 24222 xyz B<br>
abcd 24222 xyz A<br>
abcd 24222 xyz D</p>

<p>But I also need to send it as an email message and I need to have A (say in Green color), B (in Red) etc. How could I do it?  </p>

<p>What I've tried is attach FONT COLOR = #somecolor &amp; /FONT tags at the front and back of A, B etc. And I wrote a method/module which adds table, tr &amp; td tags) at appropriate parts of the string so that the message would like an HTML table in the email. But, There is an issue with this approach:<br>
1) This doesn't always work properly. The emails (obtained by running the exact same script)  are different and many times with misalligned members and mysterious tr's or td's appearing (at different locations each time). even though my html table creation is correct</p>

<p>Any help would be appreciated. </p>
