How to use a Text File as a Template to Send Email in C#

Answer:

1. Create a text file in your project

2. Code your template in the text file for example:

     <code>Name:  ##Name##
                  E-Maile:  ##Email##
                  Home Phone:  ##Phone##
                  Comments:   ##Comments##

</code>

3. Save and close

4. In your C# code read the text file using "using System.IO" and
string MyFile = Server.MapPath("~/App_Data/ContactForm.txt");
string mailMessage = File.ReadAllText(MyFile)
mailMessage = mailMessage.Replace(""##Name##,"Mack");
mailMessage = mailMessage.Replace(""##Name##,"Mack");