%@ Page language="c#" %> <%@ Import Namespace="System.Web" %> <%@ Import Namespace="System.Web.Mail" %> <% bool error = false; bool sent = false; bool formOption = false; // check if form has been submitted - must be a submitted field name if(Request.Form["txtName"] != null) { // set styles string messageStyles = ""; string MessageStart = "
There is a new enquiry from the Amel Tafsout website:
"; // email subject string addSubject = ""; string messageSubject = "Amel Tafsout Enquiry"; // get the values from each form field string name = Request.Form["txtName"]; string email = Request.Form["txtEmail"]; string comments = Request.Form["txtComments"]; // create the message body string details = "| Name: | " + name + " |
| Email address: | " + email + " |
| Comments: | " + comments + " |
| |||||||||||||||||||||||||||||||||||||