Prevent Outlook from butchering HTML emails with MsoNormal?

  • Thread starter Thread starter Beardsly
  • Start date Start date
B

Beardsly

Guest
I'm seeing a very frustrating issue with how Outlook 2013 is rendering a simple HTML-based table in an email. It is being totally re-written to have extra line breaks, styling, white space and superfluous code. Is there a way to prevent this, or a workaround method? Here is my test table code, about as simple as it gets:

<table>
<tr>
<td>Line 1</td>
</tr>
<tr>
<td>Line 2</td>
</tr>
</table>

On the receiving side, I look at the source code, and that table has been converted to this monstrosity:

<table class=MsoNormalTable border=0 cellpadding=0 style='mso-cellspacing:1.5pt; mso-yfti-tbllook:1184'>
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
<td style='padding:.75pt .75pt .75pt .75pt'>
<p class=MsoNormal><o:p>&nbsp;</o:p></p>
<p class=MsoNormal><o:p>&nbsp;</o:p></p>
<p class=MsoNormal>Line 1</p>
<p class=MsoNormal><br>
<br style='mso-special-character:line-break'>
<![if !supportLineBreakNewLine]><br style='mso-special-character:line-break'>
<![endif]></p>
</td>
</tr>
<tr style='mso-yfti-irow:1;mso-yfti-lastrow:yes'>
<td style='padding:.75pt .75pt .75pt .75pt'>
<p class=MsoNormal><o:p>&nbsp;</o:p></p>
<p class=MsoNormal>Line 2</p>
<p class=MsoNormal><br>
<br style='mso-special-character:line-break'>
<![if !supportLineBreakNewLine]><br style='mso-special-character:line-break'>
<![endif]></p>
</td>
</tr>
</table>

It looks absolutely terrible when displayed in the email. From my understanding this issue is created by how MS incorrectly renders HTML emails using the horrendous MS Word HTML back-end instead of using a real web renderer. This is for an automated alert email template for a task at my work, so changing mail providers is not an option, I am required to use MS Outlook and Exchange.

Continue reading...
 
Back
Top