当记录上传到sql表时,我正在发送通用电子邮件。我的问题是,正在发送的电子邮件字体是绿色的。我该如何改变呢?和在哪里?
下面是我的代码:DECLARE @MyRecipients varchar(max)
SET @MyRecipients =
STUFF((SELECT ';' + email
FROM dbo.Expense_Projection
WHERE StatusID = 1 and dbo.Expense_Projection.StatusDate = '2015-10-21'
FOR XML PATH('')),1,1,'')
Print @MyRecipients
exec msdb.dbo.sp_send_dbmail
@profile_name = 'Travel NoReply Profile',
@subject = 'Professional Development Travel Funds Are Now Allocated',
@body = 'Thank you for applying for Travel funds. ',
@body_format = 'HTML',
@recipients = @MyRecipients ,
@copy_recipients = '',
@blind_copy_recipients = ''
这显然是太迟了,不能帮助你,但可能会帮助别人,因为我正在寻找这样一个答案,当我发现这个问题。当我需要对一个@body_format = 'HTML'的电子邮件执行此操作时,我将@body文本的值包含在一个span中,并为其添加样式属性:
@body = '<span style="color:#990000; font-weight:bold;">Thank you for applying for travel funds.</span> ',