My logo image does not show in body of email
I tried to use this code but maybe I have not added the image path as its supposed to be
private AlternateView Mail_Body(string activationCode)
{
string user = txtname.Text;
string body = "<img src='images/mylogo.png' id='img' alt ='' width ='150px' height ='40px' />";
body += "<p Style='font-size: 14px;'>Hello " + user + ",</p>";
body += "<p Style='font-size: 14px;'>You just created a new account.</p>";
body += "<p Style='font-size: 14px;'>Click the button below to confirm your email and activate your account.</p>";
body += "<br /><a style='display: block; width: 150px; height: 25px; background: #32CD32;padding: 7px;font-family: Graphik; text-align:center; font-size: 11pt; border-radius: 5px;color: white;font-weight: 500;text-decoration: none;'>Activate Account</a>";
body += "<p Style='font-size: 14px;'>Best Regards,</p>";
body += "<p Style='font-size: 14px;'>The Admin.</p>";
ContentType mimeType = new System.Net.Mime.ContentType("text/html");
AlternateView alternate = AlternateView.CreateAlternateViewFromString(body, mimeType);
return alternate;
}
But in my code its
https://www.mywebsite.com/image/mylogo.png
Another thing that came in my mind is that maybe the image is not showing because the image path comes directly from the image folder.
Do I have to add an HTML image control that references the image on my HTML page for the image to show in the email?