Be seen. Boost your question’s priority for more expert views and faster solutions
<br />
tag or indeed any self closing tag the source of the message gets altered by SQL Server Mail and the final / is removed from the tag i.e
<br />
becomes
<br>
.<br>
is not a valid for this DTD. SET @BodyHTML =
N'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title> + @MessageSubject + </title>
<style type="text/css">
body
{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #333;
}
</style>
</head>
<body><br/>
DECLARE @rc int,
@Message varchar(1000)
SET @Message = '<html>
<body bgColor=#ffffff>
Test Email. <br />
</body>
</html>'
EXEC @rc = msdb.dbo.sp_send_dbmail
@recipients = 'my email address goes here',
@subject = 'Test Email',
@body_format = 'HTML',
@body = @Message
SELECT @rc
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
http://www.experts-exchange.com/Software/Office_Productivity/Groupware/Outlook/Q_26826472.html