sql - HTML rendering in email (ie Outlook) -


i have stored procedure queries , outputs data email. have been tasked adding legend email explains results being displayed in table within email. using html editor , saved file , opened within browser (chrome) , looks want (screenshot 1).

enter image description here

however, when execute sproc , email sent me, layout off (screenshot 2). view html source of email , appears have entered stored procedure. please ignore black boxes blocking out contact information.

enter image description here

this statement in procedure adds section beginning of email. contact information in own float table (left) , legend in it's own float table (right)

is there can address issue html email rendering?

    select         @headerhtml = @headerhtml + '             <br />             <div>             <table style="float:left">                 <tr>                     <td style="padding: 0; margin: 0; text-align: left; font-size: 12px;" align="left">the questionable claims email alerts claims determined anomalies.  please click rx.refill number additional detail.</td>                 </tr>                 <tr>                     <td style="padding: 0; margin: 0; text-align: left; font-size: 12px;" align="left">for questions, contact ...... support @ ....... or calling ........</td><br>                 </tr>                 <tr>                     <th style="padding: 0; margin: 0; text-align: left; font-size: 18px;" align="left"># of stores: 19</th>                 </tr>             </table>             <table style="float:right; margin-bottom: 15px; margin-right: 100px" frame="box">                  <tr>                    <td style="padding: 0; text-align: center; font-size: 18px;"><u>rule violation key</u></td>                   </tr>                   <tr>                    <td style="padding: 0; text-align: left; font-size: 14px;"><b>1</b> - gpm > 300%</td>                   </tr>                   <tr>                    <td style="padding: 0; text-align: left; font-size: 14px;"><b>2</b> - gpm < -100%</td>                   </tr>                   <tr>                    <td style="padding: 0; text-align: left; font-size: 14px;"><b>3</b> - contract cost = $0.00</td>                   </tr>                   <tr>                    <td style="padding: 0; text-align: left; font-size: 14px;"><b>4</b> - cash claim copay = $0.00</td>                   </tr>                   <tr>                    <td style="padding: 0; text-align: left; font-size: 14px;"><b>5</b> - copay on fills < $0.00</td>                   </tr>                   <tr>                    <td style="padding: 0; text-align: left; font-size: 14px;"><b>6</b> - claim amount on fills < $0.00</td>                   </tr>             </table>             </div>             <br />' 


Comments