您好我在电子邮件中发送下载手册链接,但我只收到文本而不是邮件中的链接
下面的是我发送邮件的代码
StringBuilder sb = new StringBuilder();
sb.Append("<html><body><a href='"+Server.MapPath("~/Documents/Brochure.pdf") +"'>Download Brochure </a>");
sb.Append("<br></body></html>");
string messageBody = sb.ToString();
string AdminEmail = ConfigurationManager.AppSettings["AdminEmailForEmail"];
string AdminPassword = ConfigurationManager.AppSettings["AdminPasswordForPassword"];
string Reciepient = Email;
string subject = "Brochure Download";
string FromMail = "info@testmail.in";
string emailTo = Reciepient;
MailMessage mail = new MailMessage();
SmtpClient SmtpServer = new SmtpClient("testmail.in");
mail.From = new MailAddress(FromMail);
mail.To.Add(emailTo);
mail.Subject = subject;
mail.IsBodyHtml = true;
mail.Body = messageBody;
SmtpServer.Port = 25;
SmtpServer.Credentials = new System.Net.NetworkCredential(AdminEmail, AdminPassword);
SmtpServer.EnableSsl = false;
try
{
SmtpServer.Send(mail);
return true;
}
catch (Exception ex)
{
return false;
}