I am attempting to add an image to string builder which i'm generating for sending an email. However I can't seem to get the image to be displayed in the email but I can get it attached.
I'm using mymail.Attachments.Add(new Attachment(HttpContext.Current.Server.MapPath("~/Content/" + qrID + ".png"))); and that attaches fine but the following does not work
string mapPath = $"/~Content/{qrID}.png";
StringBuilder sb = new StringBuilder();
sb.Append(
"<table>" +
" <tr>" +
" <td>Image: </td>" +
" <td><img src =\"HttpContext.Current.Server.MapPath(" + mapPath + " )>" +
" </tr>" +
"</table>");
Appreciate some help in getting my image to show on my email
Regards