Using html page as mail body in asp.net
-
29-09-2019 - |
Question
I have an email template in a file called template.html, how can i use it as mail body in asp.net?
Solution
There's a sample here with code.
Or you could use the MailDefinition class.
OTHER TIPS
You can use this:
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");
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow