I have a stored procedure that is used to send mails to a list of people .
I have stored the image in varbinary(max) in my database in imagetable .
I am unable to send the email along with images in body .
Can anybody please help ?
What I have tried:
have tried adding the image in body like ..
'<a href=''someurl/newsletter.aspx/?id=' + CAST(@ID As varchar(20))+''+CAST(@THEIMAGE As varchar(max))+''+'''>Please click here to fill your missing details';
Cursors are as follows..
Begin
-- Declare Variable To Hold The Email Address Retrived
DECLARE @Email varchar(255)
DECLARE @Name varchar(255)
DECLARE @ID int
DECLARE @THEIMAGE varbinary(max)
--Declare Cursor to loop through the table data
DECLARE EmailCursor Cursor For
Select ID,email,name from demoemail
-- Open cursor for fetching data in email variable
open EmailCursor
Fetch Next From EmailCursor into @ID,@Email,@Name
while(@@FETCH_STATUS = 0)
Begin
DECLARE @out_desc varchar(1000),
@out_mesg varchar(10)