使用下面的简单 SMTP C# 代码发送电子邮件,我如何发送电子邮件模板?
System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage();
message.To.Add(toEmailAddress);
message.Subject = "subject";
message.From = new System.Net.Mail.MailAddress(from);
message.Body = "http://www.yoursite.com/email.htm";
message.IsBodyHtml = true;
System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient("server");
smtp.Send(message);
目前,正如预期的那样,收到的电子邮件仅包含模板的 URL。我怎样才能让它发送模板?