Hey all,
I am working on a Booking form user control which once it does its things it collects all the data and emails it to the user.
I would like to send the email using html in the body but everytime i try to add html it doesnt apply and the email is sent like <h2>Thank you</h2> rather than applying the html.
Here is my code
protected void SendUserMail()
{
//string emailTest = File.ReadAllText(Server.MapPath("~/EmailTemplate/EmailTemplate.htm"));
var fromAddress = "test@test.co.uk";
var toAddress = txtEmail.Text.ToString();
const string toPassword = "***********";
string subject = "Your Booking enquiry Details";
string body = "<h2>Thank you</h2>";
var smtp = new System.Net.Mail.SmtpClient();
{
smtp.Host = "********";
...
Go to the complete details ...