How can we encode the image into the body of the email when sending mail using database mail in sql 2008 I m using :
exec msdb.dbo.sp_send_dbmail
@profile_name = 'DBMail',
@recipients = '[email protected]',
@subject = 'DB hello',
--@file_attachments = 'C:\logo.jpg',
@body='<p>Image Test</p><img src="C:\logo.jpg" width="270" height="146"" /><p>See image there?</p>' ,
@body_format = 'HTML';
Any help would be highly appreciable.. Thanks
You've almost done it:
Attach required images using
@file_attachments
separate them using;
an then use their names (only file name with extension) in@body
.