% if request.form("email") <> "" then if chkemail(request.form("email")) <> 1 then '--- old emailform script Dim shopemail, shopBody Set objErremail= Server.CreateObject("CDO.Message") With objErremail .From = request("email") .To = sendmail .Subject = restname & " Web Form - " & request("subject") shopBody=shopBody & "Name: " & request("name") & vbcrlf & vbcrlf shopBody=shopBody & "Email: " & request("email") & vbcrlf & vbcrlf shopBody=shopBody & "Tel: " & request("tel") & vbcrlf & vbcrlf shopBody=shopBody & "Comments: " & request("enquiry") & vbcrlf & vbcrlf if request("promotions") = "YES" then shopBody=shopBody & "The sender has indicated they are willing to receive promotional messages by text or email." & vbcrlf & vbcrlf else shopBody=shopBody & "The sender has indicated they are NOT willing to receive promotional messages by text or email." & vbcrlf & vbcrlf end if shopBody=shopBody & "This email was sent on : " & date & " at " & time .TextBody = Cstr("" & shopbody) .Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "195.234.116.130" .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .Configuration.Fields.Update .Send End With set objErremail = nothing DIM custemail, custBody Set objErremail= Server.CreateObject("CDO.Message") With objErremail .From = sendmail .To = request.form("email") .Subject = "Thank you "& request.form ("name") custBody=custBody & "Thank You " & request.form("name") & vbcrlf & vbcrlf custBody=custBody & "We have received your email and will deal with it promptly." & vbcrlf & vbcrlf custBody=custBody & restname & " - " & url & vbcrlf .TextBody = Cstr("" & custBody) .Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "195.234.116.130" .Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .Configuration.Fields.Update .Send End With set objErremail = nothing '--- end old emailform else validate = "X" end if end if %>