0
SQL Server에서 데이터베이스 메일을 사용 중이며 전자 메일을 보내려고합니다. 나는 테스트를 목적으로이 간단한 HTML 메시지를 만들었습니다SQL Server 데이터베이스 메일 : Outlook 및 gmail에서 HTML이 렌더링되지 않습니다.
는declare @body nvarchar(1000)
select @body =
'<html><body>
<h3>Test Email</h3>
<table border="1">
<tr>
<th>ID </th>
<th>Name</th>
</tr>
<tr>
<td>1</td>
<td>John</td>
</tr>
<tr>
<td>2</td>
<td>Marry</td>
</tr>
</table>
</body></html>'
EXEC msdb.dbo.sp_send_dbmail @recipients = '[email protected]'
, @subject = 'Test', @body = @body, @reply_to = '[email protected]',
@from_address = '[email protected]', @profile_name= 'My SMTP'
그러나, HTML은 모두 아웃룩 2013의 Gmail에 렌더링되지 않습니다. 표시 내용 :
왜 작동하지 않습니까?
답변을
실행 코드 snippetCopy 조각을 HTML로
body_format
속성을 설정 – ElenaDBA