SQL Server Email Pastes Literal HTML I am attempting to use HTML in my sql server send mail, but my email just shows what I type instead of formatting properly.  Can someone show me what needs to be altered in order for this to appear as HTML

declare @body1 varchar(4000)
set @body1 = '&lt;html&gt;
        &lt;body style="background: #e3e3e3;"&gt;
        &lt;center&gt;
        &lt;table style="width: 800px; margin-right: auto; margin-left: auto;"&gt;
        &lt;tbody&gt;
        &lt;tr&gt;
        &lt;td colspan="2"&gt;&lt;img src="c:\2.png" alt="Image 2" /&gt;&lt;/br&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;/tbody&gt;
        &lt;/table&gt;
        &lt;/center&gt;
        &lt;/body&gt;
        &lt;/html&gt;'

EXEC msdb.dbo.sp_send_dbmail
    @profile_name = 'Mod',
    @from_address = 'modis@modisglobal.com',
    @recipients= 'rsmith@gmail.com',
    @subject= 'Test Email', 
    @body = @body1
From the documentation, you can see there's a @body_format option.


  [ @body_format= ] 'body_format' Is the format of the message body. The
  parameter is of type varchar(20), with a default of NULL. When
  specified, the headers of the outgoing message are set to indicate
  that the message body has the specified format. The parameter may
  contain one of the following values: TEXT HTML Defaults to TEXT.


Set it to HTML.

EXEC msdb.dbo.sp_send_dbmail
    @profile_name = 'Mod',
    @from_address = 'modis@modisglobal.com',
    @recipients= 'rsmith@gmail.com',
    @subject= 'Test Email', 
    @body = @body1,
    @body_format = 'HTML'