How to include link in a mail body message?

You need to enable HTML for the body of the MailMessage like so:

o.IsBodyHtml = true;

Maybe you should choose another constructor, to make the code more readable. Something like this perhaps:

var mailMessage = new MailMessage();
mailMessage.From = new MailAddress("[email protected]", "Customer Service");
mailMessage.To.Add(new MailAddress("[email protected]"));
mailMessage.Subject = "A descriptive subject";
mailMessage.IsBodyHtml = true;
mailMessage.Body = "Body containing <strong>HTML</strong>";

Full docs: http://msdn.microsoft.com/en-us/library/System.Net.Mail.MailMessage(v=vs.110).aspx

Update It seems like it is your string building that cause you trouble. Sometimes, when putting strings together (or concatenating them as it is called) it is tricky to get all quotes correct. When creating such a large string as an email, there are some options to get it right.

First, regular string - downside is that it's hard to read

string body = "Hello, " + name + "\n Your KAUH Account about to activate click the link below to complete the actination process \n <a href=\"http://localhost:49496/Activated.aspx">login</a>";

Second, verbatim string - allows line breaks in the code which improved readability. Note the @ character in the beginning and that the quote escape sequence changed from \" to "".

string body = @"Hello, " + name + "\n Your KAUH Account about to
    activate click the link below to complete the actination process \n 
    <a href=""http://localhost:49496/Activated.aspx"">login</a>"

Third, string builder. This is actually the preferred way in many regards.

var body = new StringBuilder();
body.AppendFormat("Hello, {0}\n", name);
body.AppendLine(@"Your KAUH Account about to activate click 
    the link below to complete the actination process");
body.AppendLine("<a href=\"http://localhost:49496/Activated.aspx\">login</a>");
mailMessage.Body = body.ToString();

StringBuilder docs: http://msdn.microsoft.com/en-us/library/system.text.stringbuilder(v=vs.110).aspx


mark message as html o.IsBodyHtml = true


     String body = "ur message : <a href='http://www.yoursite.com'></a>"
     o.Body = body;

o.IsBodyHtml = true