我想我得到了答案:
EXEC msdb.dbo.sp_send_dbmail @recipients = 'myemail@someemail.com', @subject = 'test', @file_attachments = 'C:MyFolderTestGoogle.gif;C:MyFolderTestYahoo.gif', @body=N'<p>Image Test</p><img src="Google.gif" /><p>See image there?</p> <img src="Yaoo.gif" /><p>Yahoo!</p>', @body_format = 'HTML';
基本上,将图像添加为附件,并且src属性仅包含图像文件名,不需要任何路径。如果需要多个图像文件,只需使用“;” 分开他们。
我将电子邮件发送到我的Outlook电子邮件,并且可以正常工作。尝试到我的Yahoo电子邮件…。



