% ' If the form has been submitted If Request.Form("btnSubmit") = "Book Appointment" Then ' Set the email subject and body text strSubject = "Tony Gallagher Appointment" strBody = strBody & "Here are the details that have been sent via the Tony Gallagher appointment form:" & vbcrlf & vbcrlf strBody = strBody & "Name: " & Trim(Request.Form("txtName")) & vbcrlf strBody = strBody & "Contact No: " & Trim(Request.Form("txtContact")) & vbcrlf strBody = strBody & "Email: " & Trim(Request.Form("txtEmail")) & vbcrlf strBody = strBody & "Preferred Date & Time: " & Trim(Request.Form("txtPreferredDate")) & " - " & Trim(Request.Form("txtPreferredTime")) & vbcrlf strBody = strBody & "Stylist: " & Trim(Request.Form("txtStylist")) & vbcrlf strBody = strBody & "Description of Service: " & vbcrlf & Trim(Request.Form("txtDescription")) & vbcrlf strBody = strBody & vbcrlf & "Regards," & vbcrlf & "Tony Gallagher Online" ' Mail configuration Set objConf = Server.CreateObject("CDO.Configuration") objConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1 objConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "127.0.0.1" objConf.Fields.Update ' Set up the email Set objMail = Server.CreateObject("CDO.Message") Set objMail.Configuration = objConf objMail.From = "do-notreply@tonygallagher.co.uk" ' objMail.To = "tony@branch-solutions.co.uk" objMail.To = "bookings@tonygallagher.co.uk" objMail.CC = "bookingsnli@tonygallagher.co.uk" objMail.Subject = strSubject objMail.TextBody = strBody objMail.Send ' Release the instance Set objMail = Nothing End if %>
Thank you for your booking, we will be in contact.
<%Else%> <%End If%>