Zubair Alam

Zubair Alam

  • NA
  • 11
  • 915

How Can I Add Image In Gmail Body Panel MVC 5

Nov 5 2018 1:47 PM
[NonAction]
public void SendVerificationLinkEmail(string emailID, string activationCode)
{
var verifyUrl = "/FloralAccounts/VerifyAccount/" + activationCode;
var link = Request.Url.AbsoluteUri.Replace(Request.Url.PathAndQuery, verifyUrl);
var fromEmail = new MailAddress("Here Is My Email", "Zubair Alam");
var toEmail = new MailAddress(emailID);
var fromEmailPassword = "Here Is My Password"; // Replace with password
string subject = "Your account is successfully created!";
 
I Want to Add One Image In string Body Inside 
 
string body = "<br/><br/>We are excited to tell you that your Floral Shop account is" +
" successfully created. Please click on the below link to verify your account" +
" <br/><br/><a href='" + link + "'>" + link + "</a> ";
var smtp = new SmtpClient
{
Host = "smtp.gmail.com",
Port = 587,
EnableSsl = true,
DeliveryMethod = SmtpDeliveryMethod.Network,
UseDefaultCredentials = false,
Credentials = new NetworkCredential(fromEmail.Address, fromEmailPassword)
};

Answers (3)