<% ' Website Contact Form Generator ' http://www.tele-pro.co.uk/scripts/contact_form/ ' This script is free to use as long as you ' retain the credit link ' declare variables Dim EmailFrom Dim EmailTo Dim Subject Dim purchaser_name Dim purchaser_email Dim purchaser_phone Dim purchaser_cc_name ' get posted data into variables EmailFrom = "orders@nothingtoit.com" EmailTo = "brian@nothingtoit.com" Subject = "Order" purchaser_name = Trim(Request.Form("purchaser_name")) purchaser_email = Trim(Request.Form("purchaser_email")) purchaser_phone = Trim(Request.Form("purchaser_phone")) purchaser_cc_name = Trim(Request.Form("purchaser_cc_name")) purchaser_cc_number = Trim(Request.Form("purchaser_cc_number")) purchaser_cc_exp = Trim(Request.Form("purchaser_cc_exp")) purchaser_exp_yr = Trim(Request.Form("purchaser_exp_yr")) purchaser_cc_type = Trim(Request.Form("purchaser_cc_type")) rec_name = Trim(Request.Form("rec_name")) rec_address = Trim(Request.Form("rec_address")) rec_phone = Trim(Request.Form("rec_phone")) rec_email = Trim(Request.Form("rec_email")) rec_amount = Trim(Request.Form("rec_amount")) rec_amount_other = Trim(Request.Form("rec_amount_other")) mailto = Trim(Request.Form("mailto")) ' validation Dim validationOK validationOK=true If (Trim(purchaser_name)="") Then validationOK=false If (validationOK=false) Then Response.Redirect("error.htm?" & EmailFrom) ' prepare email body text Dim Body Body = Body & "purchaser_name: " & purchaser_name & VbCrLf Body = Body & "purchaser_email: " & purchaser_email & VbCrLf Body = Body & "purchaser_phone: " & purchaser_phone & VbCrLf Body = Body & "purchaser_cc_name: " & purchaser_cc_name & VbCrLf Body = Body & "purchaser_cc_number: " & purchaser_cc_number & VbCrLf Body = Body & "purchaser_cc_exp: " & purchaser_cc_exp & VbCrLf Body = Body & "purchaser_exp_yr: " & purchaser_exp_yr & VbCrLf Body = Body & "purchaser_cc_type: " & purchaser_cc_type & VbCrLf Body = Body & "rec_name: " & rec_name & VbCrLf Body = Body & "rec_address: " & rec_address & VbCrLf Body = Body & "rec_phone: " & rec_phone & VbCrLf Body = Body & "rec_email: " & rec_email & VbCrLf Body = Body & "rec_amount: " & rec_amount & VbCrLf Body = Body & "rec_amount_other: " & rec_amount_other & VbCrLf Body = Body & "Pickup Information: " & mailto & VbCrLf ' send email Dim mail Set mail = Server.CreateObject("CDONTS.NewMail") mail.To = EmailTo mail.From = EmailFrom mail.Subject = Subject mail.Body = Body mail.Send ' redirect to success page Response.Redirect("thankyou.html?" & EmailFrom) %>