I am using sp_send_dbmail
in SQL Server 2008 to send out an HTML email. I can reference to image with url like <img src="http:..." />
I have attached the image with the @file_attachments
. How to reference to this image in attachment?
I am using sp_send_dbmail
in SQL Server 2008 to send out an HTML email. I can reference to image with url like <img src="http:..." />
I have attached the image with the @file_attachments
. How to reference to this image in attachment?
EXEC msdb.dbo.sp_send_dbmail
@recipients = 'xxx@yyy.com',
@subject = 'test',
@file_attachments = 'C:\Test\Image.gif;C:\Test\Image2.gif',
@body=N'<p>Image Test</p><img src="Image.gif" /><p>See image there?</p>',
@body_format = 'HTML';
Here is the exact code that I used, and it worked just fine for me.
EXEC msdb.dbo.sp_send_dbmail
@recipients = 'xxx@wxxxx.com',
@subject = 'test',
@profile_name = 'global config',
@file_attachments = 'C:\testimage.png',
@body=N'<p>Image Test</p><img src="testimage.png" /><p>See image there?</p>',
@body_format = 'HTML';