Advertisement
Guest User

How to embed image in html and send html as email by msdb.dbo.sp_send_dbmail

a guest
Nov 15th, 2011
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. EXEC msdb.dbo.sp_send_dbmail
  2. @recipients = @p_recipients,
  3. @subject = @v_subject,
  4. @body=@emailHTML,
  5. @body_format = 'HTML';
  6.  
  7. EXEC msdb.dbo.sp_send_dbmail
  8. @recipients = 'myemail@someemail.com',
  9. @subject = 'test',
  10. @file_attachments = 'C:MyFolderTestGoogle.gif;C:MyFolderTestYahoo.gif',
  11. @body=N'<p>Image Test</p><img src="Google.gif" /><p>See image there?</p>
  12. <img src="Yaoo.gif" /><p>Yahoo!</p>',
  13. @body_format = 'HTML';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement