Hello All,
string from = "[email protected]";
string to = "[email protected],[email protected]";
string password="abcxyz";
MailMessage mail = new System.Net.Mail.MailMessage();
mail.To.Add(to);
mail.From = new MailAddress(from, "Check Email", System.Text.Encoding.UTF8);
mail.Subject = "This is a test mail";
mail.SubjectEncoding = System.Text.Encoding.UTF8;
mail.Body = "<html><body><h1>My Message</h1><br><a href=www.stackoverflow.com>stackoverflow</a></body></html>";
mail.IsBodyHtml = true;
SmtpClient client = new SmtpClient();
client.Credentials = new System.Net.NetworkCredential(from,password);
client.Port = 587;
client.Host = "smtp.gmail.com";
client.EnableSsl = true;
client.Send(mail);
This code successfully sents the mail. When i look at my gmail, the "stackoverflow" link renders as link and i was able to navigate to the respective page, but in yahoo i don't find any link instead just the text "stackoverflow" appears.