I am using the below partial code to send email message to our client like News letters.It sent correctly but i have a small problem for sending email. Now i post some images in HTML code. Image does not show in email message.Please help me to solve this issue..
This is my partial code:
msg.To = wemail;
//msg.Bcc = "bcc email";
msg.BodyFormat = MailFormat.Html;
msg.Body = "<html xmlns='http://www.w3.org/1999/xhtml'><head><title>Untitled Document</title></head><body><table width='506' style='border-style:solid; border-radius:5px;' ><tr><td width='496'> <img src='../images/logo1.jpg' alt='' width='508' /></td></tr><tr> <td height='1px'><hr /></td></tr><tr style='border:0px; background:#6CF;'> <td align='left' style='border-bottom:1px;'><p><b>Dear Team,</b></p> <p><b> This mail is to inform you ....</b></p> <p><u><b>Note : </b></u></p> <p><i> .... </i> </p> <form action='http://xxx.in' method='post' target='_blank'> <!-- <form id='form1' name='form1' method='post' action=''>--> <b> Please Click Here : </b> <input type='submit' name='btn_submit' id='btn_submit' onclick='window.location.href='http://xxx.in'' value='Visit our 'Portal' ' /> </form><br /><br /></td></tr><tr style='border-top:#000'> <td> <img src='../images/Untitled-2.gif' alt='' /></td></tr></table></body></html>";
you need to provide the entire url for the image and not just
<img src='../images/logo1.jpg' alt='' width='508' />instead provide exact path to .jpg file
and if you want to embed your mail, then you have to use ‘cid’ like
<img src="cid:whatever">The “src=cid:” part is required for the email client to recognize the tag as an embedded image, while the “whatever” part is the actual Content-Id of the LinkedResource image.For more information you can look here : http://www.systemnetmail.com/faq/4.4.aspx