源码是这样的
MailMessage mail = new MailMessage("******@maxwealth.cn",//发件人地址
"[email protected]",//收件人地址
"闷",//主题
"<a href=\"www.baidu.com\">146</a>");//内容
mail.IsBodyHtml = true;
SmtpClient sc = new SmtpClient("202.104.57.142");
sc.Credentials = new System.Net.NetworkCredential("*****", "*********");
sc.Send(mail);
能发送,但是查看邮件是不能超链接不正确,超链接显示的是href="#".怎么会这样?!!谁来帮帮我?
MailMessage mail = new MailMessage("******@maxwealth.cn",//发件人地址
"[email protected]",//收件人地址
"闷",//主题
"<a href=\"www.baidu.com\">146</a>");//内容
mail.IsBodyHtml = true;
SmtpClient sc = new SmtpClient("202.104.57.142");
sc.Credentials = new System.Net.NetworkCredential("*****", "*********");
sc.Send(mail);
能发送,但是查看邮件是不能超链接不正确,超链接显示的是href="#".怎么会这样?!!谁来帮帮我?
"[email protected]");
mail.Subject = "闷";
string str=HttpUtility.HtmlEncode("<a href=\"www.baidu.com\">146</a>");
mail.IsBodyHtml = true;
mail.Body = str;
SmtpClient sc = new SmtpClient("202.104.57.142");
sc.Credentials = new System.Net.NetworkCredential("****", "******"); sc.Send(mail);
是这样用么? 但用后他显示的是<a href="www.baidu.com">146</a> 纯文本格式.
等待回复中!