% ' 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 Name Dim Company Dim Products Dim Service Dim Other Dim Comments ' get posted data into variables EmailFrom = Trim(Request.Form("EmailFrom")) EmailTo = "wulliemcmartin2003@yahoo.co.uk" Subject = "mbas Web Enquiry" Name = Trim(Request.Form("Name")) Company = Trim(Request.Form("Company")) Products = Trim(Request.Form("Products")) Service = Trim(Request.Form("Service")) Other = Trim(Request.Form("Other")) Comments = Trim(Request.Form("Comments")) ' validation Dim validationOK validationOK=true If (Trim(EmailFrom)="") Then validationOK=false If (validationOK=false) Then Response.Redirect("error.htm?" & EmailFrom) ' prepare email body text Dim Body Body = Body & "Name: " & Name & VbCrLf Body = Body & "Company: " & Company & VbCrLf Body = Body & "Products: " & Products & VbCrLf Body = Body & "Service: " & Service & VbCrLf Body = Body & "Other: " & Other & VbCrLf Body = Body & "Comments: " & Comments & 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("ok.htm?" & EmailFrom) %>