<% ' 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 = "info@nothingtoit.com" Subject = "Gift Certificate Order" purchaser_name = Trim(Request.Form("purchaser_name")) purchaser_address = Trim(Request.Form("purchaser_address")) purchaser_city = Trim(Request.Form("purchaser_city")) purchaser_state = Trim(Request.Form("purchaser_state")) purchaser_zip = Trim(Request.Form("purchaser_zip")) 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_ssid = Trim(Request.Form("purchaser_ssid")) purchaser_cc_type = Trim(Request.Form("purchaser_cc_type")) rec_name = Trim(Request.Form("rec_name")) rec_address = Trim(Request.Form("rec_address")) rec_city = Trim(Request.Form("rec_city")) rec_state = Trim(Request.Form("rec_state")) rec_zip = Trim(Request.Form("rec_zip")) 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")) instructions = Trim(Request.Form("instructions")) ' 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 Address: " & purchaser_address & VbCrLf Body = Body & "Purchaser City: " & purchaser_city & VbCrLf Body = Body & "Purchaser State: " & purchaser_state & VbCrLf Body = Body & "Purchaser Zip: " & purchaser_zip & VbCrLf Body = Body & "Purchaser Email: " & purchaser_email & VbCrLf Body = Body & "Purchaser Phone: " & purchaser_phone & VbCrLf Body = Body & "Credit Card Name: " & purchaser_cc_name & VbCrLf Body = Body & "Credit Card Number: " & purchaser_cc_number & VbCrLf Body = Body & "Credit Card Exp Month: " & purchaser_cc_exp & VbCrLf Body = Body & "Credit Card Exp Year: " & purchaser_exp_yr & VbCrLf Body = Body & "Credit Card Type: " & purchaser_cc_type & VbCrLf Body = Body & "Credit Card SSID: " & purchaser_ssid & VbCrLf Body = Body & "Recipient Name: " & rec_name & VbCrLf Body = Body & "Recipient Address: " & rec_address & VbCrLf Body = Body & "Recipient City: " & rec_city & VbCrLf Body = Body & "Recipient State: " & rec_state & VbCrLf Body = Body & "Recipient Zip: " & rec_zip & VbCrLf Body = Body & "Recipient Phone: " & rec_phone & VbCrLf Body = Body & "Recipient Email: " & rec_email & VbCrLf Body = Body & "Recipient Amount: " & rec_amount_other & VbCrLf Body = Body & "Pickup Information: " & mailto & VbCrLf Body = Body & "Instructions: " & instructions & 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("index.asp?page=thankyou") %>