--SQL格式
Declare @body As nvarchar(max)=N'< HTML>'
N'<p>Hi ' @userId '< /p>行為的新修正案<b>' @title '</b> is added'
N'<p>本修正案包括對該節的修改。<b>' @sectionid '</b> 和標題。<b>' @title ' 。 </b></p>'
N'<p>你收到這個訊息是因為你在Section上添加了更改警報通知。<b>' @sectionid ' 。 </b></p>'
N'</HTML>'
在接收電子郵件時
<HTML>> Hi zubairpayab</p> New amendments for act < b>修正案of section 2C< /b> 是添加<p>該修正案包括對節的修改。<b>2< /b> and標題。<b>Amendment of section 2C. </b></p> <p>您正在接收此資訊,因為您在上科添加了更改警報通知。<b>2。 </b>< /p></HTML>/span>

你能幫我糾正一下格式嗎?
uj5u.com熱心網友回復:
你需要在呼叫sp_send_dbmail時指定Body的格式為HTML
。EXEC dbo. sp_send_dbmail @profile_name = 'MyMailProfile'/span>,
@recipients = '[email protected]',
@copy_recipients = '[email protected]',
@body = 'HTML Body Content',
@body_format = 'HTML',
@subject = 'My Mail Subject';
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/306819.html
標籤:
