I'm trying to send e-mails to contacts stored in SQL Server database. The e-mails contain images.
I tried the code below,
EXEC msdb.dbo.sp_send_dbmail
@recipients = '[email protected];',
@subject = 'Sending Mail from SQL Server Test',
@file_attachments = 'C:\inetpub\wwwroot\pagerror.gif',
@body=N'<img src="pagerror.gif" />',
@body_format = 'HTML';
but some e-mail providers (like Yahoo) assume the sent mail as spam. What i need is to create the <img> tag like the ones generated by Outlook:
<img width=482 height=675 id="_x0000_i1025" src="cid:[email protected]">
With this tag, Yahoo doesn't assume it as spam. How to process the image so I can refer it like above?
I'm not an advanced SQL Server programmer. I really need a step-by-step tutorial. Please help...
Many thanks in advance
Haris