Contact form, error on ASP file

liunx

Guest
Hey guys,
I found a contact form generator that will generate certain fields in ASP (I don't have the time to learn it right now, and I needed a quick fix).

Anyway, the code wasn't exactly working so I had to do some modifications on the .htm file it supplied me with and now I get an error when trying to submit.

Here's the error I get:
Server object error 'ASP 0177 : 800401f3'

Server.CreateObject Failed

/RepoBids/contact.asp, line 36

800401f3

Here's the code:

<%
' Website Contact Form Generator
' <!-- m --><a class="postlink" href="http://www.tele-pro.co.uk/scripts/contact_form/">http://www.tele-pro.co.uk/scripts/contact_form/</a><!-- m -->
' This script is free to use as long as you
' retain the credit link

' declare variables
Dim EmailFrom
Dim EmailTo
Dim Bid
Dim Question
Dim Subject

' get posted data into variables
EmailFrom = Trim(Request.Form("EmailFrom"))
EmailTo = "[email protected]"
Subject = "Repo Bid/Question"
Bid = Trim(Request.Form("Bid"))
Question = Trim(Request.Form("Question"))
Subject = Trim(Request.Form("Subject"))

' 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 & "Bid: " & Bid & VbCrLf
Body = Body & "Question: " & Question & VbCrLf
Body = Body & "Subject: " & Subject & 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("Thanks.html" & EmailFrom)
%>

Thanks in advance!CDONTS.NewMail doesn't exsist on a windows 2003 machine only 2000/NT4.
 
Back
Top