This is my .asp code for a contact page:
why is that?
how can I fix it?
please help
thanks in advance
<%
' declare variables
Dim EmailFrom
Dim EmailTo
Dim Subject
Dim Name
Dim Mobile
Dim Date
Dim Time
Dim Pickup
Dim Dropoff
Dim Vehicle
Dim Flight_Number
Dim Pax
Dim Luggages
Dim Comments
' get posted data into variables
EmailFrom = Trim(Request.Form("EmailFrom"))
EmailTo = ""my email address"
Subject = "website enquiry"
Name = Trim(Request.Form("Name"))
Mobile = Trim(Request.Form("Mobile"))
Date = Trim(Request.Form("Date"))
Time = Trim(Request.Form("Time"))
Pickup = Trim(Request.Form("Pickup"))
Dropoff = Trim(Request.Form("Dropoff"))
Vehicle = Trim(Request.Form("Vehicle"))
Flight_Number = Trim(Request.Form("Flight_Number"))
Pax = Trim(Request.Form("Pax"))
Luggages = Trim(Request.Form("Luggages"))
Comments = Trim(Request.Form("Comments"))
' validation
Dim validationOK
validationOK=true
If (Trim(EmailFrom)="") Then validationOK=false
If (validationOK=false) Then Response.Redirect("error.html" & EmailFrom)
' prepare email body text
Dim Body
Body = Body & "Name: " & Name & VbCrLf
Body = Body & "Mobile: " & Mobile & VbCrLf
Body = Body & "Date: " & Date & VbCrLf
Body = Body & "Time: " & Time & VbCrLf
Body = Body & "Pickup: " & Pickup & VbCrLf
Body = Body & "Dropoff: " & Dropoff & VbCrLf
Body = Body & "Vehicle: " & Vehicle & VbCrLf
Body = Body & "Flight_Number: " & Flight_Number & VbCrLf
Body = Body & "Pax: " & Pax & VbCrLf
Body = Body & "Luggages: " & Luggages & 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("thankyou.html" & EmailFrom)
%>
when the user presses submit button they see this error:
Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed
/contactusprocess.asp, line 248
800401f3
why is that?
how can I fix it?
please help
thanks in advance
Last edited: