My web page produces a simple email that works correctly. I now want to put on image at the top the email. My image is xyz.jpg in folder images in my asp.net web site. Here is my code:
MailMessage mm = new MailMessage();
mm.To.Add(Convert.ToString(Session["Email"]));
mm.Subject = "Sales Order";
mm.IsBodyHtml = true;
mm.From = new System.Net.Mail.MailAddress("ABC@gmail.com");
string sBody;
sBody = "Web Site Order<br />" +
"<table>" +
"<tr>" +
"<td>" +
"Order No: </td><td>" +
salesID + "</td></tr>" +
"<tr>" +
"<td>" +
"Customer Account:</td><td>" +
Session["CustAcct"] + "</td></tr></table>"
mm.Body = sBody;
SmtpClient SMTPServer = new SmtpClient(strSMTP);
SMTPServer.Port = iPort;
SMTPServer.Send(mm);
I'd like the image to appear at the top of my email. I tried using the <img> tags but the image never displays. I think it's the syntax I'm using for the url path to the image is wrong. How do I do this?