Thank you for posting at Dotnetfunda [Administrator]
AlternateView objAlternateView; string strServerPath = Server.MapPath("images\\"); LinkedResource imgtestLogo = new LinkedResource(strServerPath + "testlogo.gif"); strBody += "<table width='100%'><tr align='center'>"; strBody += "<td align='left'><img id='logo' src='cid:imgtestLogo' alt='' />Checking</td> strBody += "</tr></table>"; objAlternateView = AlternateView.CreateAlternateViewFromString("<BR>" + strBody + "<BR>", null, "text/html"); imgtestLogo.ContentId = "imgtestLogo"; objAlternateView.LinkedResources.Add(imgtestLogo); // For sending the mail string strMailServer; MailMessage objMail = null; objMail = new MailMessage(); objMail.From = new MailAddress("From Mail"); objMail.To.Add("To Mail"); objMail.Subject = "Subject"; objMail.AlternateViews.Add(objAlternateView); objMail.Priority = MailPriority.Normal; SmtpClient objclient = new SmtpClient(MailServerAddress); objclient.Send(objMail);
Regards, T.N.Nagasundar
Login to post response