<% ' 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 First Dim Last Dim Company Dim Address Dim Telephone Dim Mobile Dim Website ' get posted data into variables EmailFrom = Trim(Request.Form("EmailFrom")) EmailTo = "lei2009@inflpr.ro" Subject = "Registration" First = Trim(Request.Form("First")) Last = Trim(Request.Form("Last")) Company = Trim(Request.Form("Company")) Address = Trim(Request.Form("Address")) Telephone = Trim(Request.Form("Telephone")) Mobile = Trim(Request.Form("Mobile")) Website = Trim(Request.Form("Website")) ' validation Dim validationOK validationOK=true If (Trim(EmailFrom)="") Then validationOK=false If (Trim(First)="") Then validationOK=false If (Trim(Last)="") Then validationOK=false If (validationOK=false) Then Response.Redirect("error.htm?" & EmailFrom) ' prepare email body text Dim Body Body = Body & "First: " & First & VbCrLf Body = Body & "Last: " & Last & VbCrLf Body = Body & "Company: " & Company & VbCrLf Body = Body & "Address: " & Address & VbCrLf Body = Body & "Telephone: " & Telephone & VbCrLf Body = Body & "Mobile: " & Mobile & VbCrLf Body = Body & "Website: " & Website & 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) %>