title: SQL Server Database Mail: HTML not rendering in Outlook and gmail
body: <p>I am using Database Mail in SQL Server and trying to send emails. I have created this simple html message for testing purposes:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>declare @body nvarchar(1000)
  select @body = 
  
  '&lt;html&gt;&lt;body&gt;
  &lt;h3&gt;Test Email&lt;/h3&gt;
  &lt;table border="1"&gt;
   &lt;tr&gt;
    &lt;th&gt;ID &lt;/th&gt;
    &lt;th&gt;Name&lt;/th&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
    &lt;td&gt;1&lt;/td&gt;
    &lt;td&gt;John&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr&gt;
    &lt;td&gt;2&lt;/td&gt;
    &lt;td&gt;Marry&lt;/td&gt; 
   &lt;/tr&gt;
  &lt;/table&gt;
  &lt;/body&gt;&lt;/html&gt;'
  
  EXEC msdb.dbo.sp_send_dbmail @recipients = 'myemail@gmail.com'
  , @subject = 'Test', @body = @body, @reply_to = 'noreply@myserver.com', 
  @from_address = 'noreply@myserver.com', @profile_name= 'My SMTP'</code></pre>
  </div>
  </div>
  </p>
  
  <p>However, html is not rendered on both Outlook 2013 and Gmail. Its showing this:
  <a href="https://i.stack.imgur.com/U0F8b.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/U0F8b.png" alt="enter image description here"></a></p>
  
  <p>Why is it not working?</p>