与使用Stringbuilder进行以下操作相比,有没有一种更好的方法可以用C#生成HTML电子邮件(用于通过System.Net.Mail发送)?
string userName = "John Doe";
StringBuilder mailBody = new StringBuilder();
mailBody.AppendFormat("<h1>Heading Here</h1>");
mailBody.AppendFormat("Dear {0}," userName);
mailBody.AppendFormat("<br />");
mailBody.AppendFormat("<p>First part of the email body goes here</p>");
等等等等?