Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在asp.net中使用html页面作为邮件正文_Asp.net_Email_Mailmessage - Fatal编程技术网

在asp.net中使用html页面作为邮件正文

在asp.net中使用html页面作为邮件正文,asp.net,email,mailmessage,Asp.net,Email,Mailmessage,我在一个名为template.html的文件中有一个电子邮件模板,如何在asp.net中将其用作邮件正文?有一个示例,其中包含代码 或者您可以使用该类。有一个示例,其中包含代码 或者您可以使用该类。您可以使用: File.ReadAllText("template.html") //This is to read template.html then you can pass this through //formatemail() function if you have or //mess

我在一个名为template.html的文件中有一个电子邮件模板,如何在asp.net中将其用作邮件正文?

有一个示例,其中包含代码

或者您可以使用该类。

有一个示例,其中包含代码

或者您可以使用该类。

您可以使用:

File.ReadAllText("template.html")

//This is to read template.html then you can pass this through
//formatemail() function if you have or
//message.body = File.ReadAllText("template.html");
您可以使用以下选项:

File.ReadAllText("template.html")

//This is to read template.html then you can pass this through
//formatemail() function if you have or
//message.body = File.ReadAllText("template.html");
可能的重复可能的重复