I a struggling to get the image display from the local resource folder in the html email body.
This is the code I am using:
string htmlBody;
htmlBody = "<h2> Hi Custom Designs, </h2>" +
"Please see below for new design request" + "<br /><br />" +
"<strong>Name:</strong> " + txtName.Text + "<br />" +
"<strong>Last Name:</strong> " + txtLastName.Text + "<br />" +
"<strong>Email Address:</strong> " + txtEmail.Text + "<br />" +
"<strong>Phone Number:</strong> " + txtCell.Text + "<br />" +
"<strong>Address:</strong> " + txtAddress.Text + "<br />" +
"<strong>Message:</strong> " + txtMessage.Text +
"<br /><br /><br />" +
"<img src='assets/img/logo.png' alt='Logo' title='Logo' style='display:block' width='200' height='87' />" + "<br /><br />" +
"Thanks" ;
mail.Body = htmlBody;
I have tried "<img src='../assets/img/logo.png' alt='Logo' title='Logo' style='display:block' width='200' height='87' />"
and "<img src='~/assets/img/logo.png' alt='Logo' title='Logo' style='display:block' width='200' height='87' />"
but still not working and the image is definitely in that folder
When the email is received is says that the image can't be displayed due to it has been remove or link is incorrect or deleted?
Not sure what am doing wrong here?
Thanks