I'm attempting to send an email using ASP.NET C#. The emails sends just fine. The problem is I am trying to embed a link within the email, but link on the client end is not recognised (as in it cant be recognised as a link by the browser)
I have tried putting the C# into one variable, I have tried to split the code into various variables but I am not too sure what I am doing wrong here. It could be how Im placing the ' or " to embed. not too sure.
string body = "Hello " + firstNameUser + ",";
body += "<br /><br />Please click the following link to activate your account";
body += "<br /><a href = '" + HttpContext.Current.Request.Url.Authority + "/Auth/Activation/Activation.aspx?ActivationCode=" + TwoFACode + "'>Click here to activate your account.</a>";
body += "<br /><br />Thanks";
body += "<br /><br />Support Team";
mail.Body = body;
mail.IsBodyHtml = true;
client.Send(mail);
'Please click the following link to activate your account' Cant be recognised meaning its not a clickable HTML Link. On the email all you can see is just text instead of a hyperlink.