使用StringBuilder的HTML电子邮件模板

时间:2018-08-02 19:46:44

标签: html console-application stringbuilder

我正在尝试使用控制台中的字符串生成器来设计html电子邮件模板 应用程式。为什么HTML标记会在控制台应用程序中原样显示?谢谢!

  using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;

 namespace EmailScript
  {
    class Program
     {
    static void Main(string[] args)
    {
        StringBuilder builder = new StringBuilder();
        builder.AppendLine("Hello Customer,");
        builder.AppendLine();
        builder.AppendLine("We have developed a dynamic toolbox that allows responsible business operations and cutting-edge technology to fully align and satisfy the diverse needs of the consumer, marketer and the end product provider.");
        builder.AppendLine();
        builder.Append("<body><table><tr><th>Customer Name</th><th>State</th><th>Customer Phone</th><th>Mileage Information</th></tr>");
        builder.AppendLine("");
        builder.AppendLine("Thanks!");
        builder.AppendLine("111-111-2222");

        var result = builder;
        Console.WriteLine(result);
        Console.ReadLine();
    }
}  

}

0 个答案:

没有答案