有没有更好的方法来生成 HTML 电子邮件在 C # (发送通过系统。网。邮件) ,而不是使用 StringBuilder 执行以下操作:
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>");
等等,等等?