sp_send_dbmail中的HTML格式 [英] HTML Format in sp_send_dbmail

查看:224
本文介绍了sp_send_dbmail中的HTML格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我格式化sp_send_dbmail以HTML格式发送电子邮件。

I formatted sp_send_dbmail to send email in HTML format. But it is sending the mail with HTML code.

以下是我使用的代码

EXEC msdb.dbo.sp_send_dbmail @recipients=N'*****@********.com', 
@body= '<font color="green" face="arial"><i>
Testing<br /> </i></font><hr />',  
@subject = 'SQL Server Trigger Mail', 
@profile_name = 'DBMailProfile1'


推荐答案

您必须指定 @body_format ='HTML'。默认为 TEXT

请参阅 sp_send_dbmail 在MSDN上:还有HTML示例

See sp_send_dbmail on MSDN: there are HTML examples too

这篇关于sp_send_dbmail中的HTML格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆