Link to home
Start Free TrialLog in
Avatar of Eric_Trogdon
Eric_Trogdon

asked on

Feedback form error Server object error 'ASP 0177 : 800401f3'

I’m trying to use a simple feedback form. When I click submit with my test data it returns this error.

Server object error 'ASP 0177 : 800401f3'

Server.CreateObject Failed

/chefdaveorgdev/contact.asp, line 89

800401f3

below is my sample code

'receive the form values
Dim sName, sEmail, sFeedback
sName=Request.Form("txtName")
sAddress=Request.Form("textAddress")
sEmail=Request.Form("txtEmail")
sFeedback=Request.Form("txtFeedback")

'create the mail object
Set NewMailObj=Server.CreateObject("CDONTS.NewMail") <---------------line 89
NewMailObj.From=sEmail
NewMailObj.To = "erictrogdon@gmail.com" '
NewMailObj.Subject = "Feedback"
NewMailObj.Body = sEmailText
NewMailObj.BodyFormat = 0
NewMailObj.MailFormat = 0
NewMailObj.Send
Set NewMailObj=Nothing

Response.write "<div align='center'>Thank you for sending your feedback.<br>"
Response.write "We will get back to you if necessary.</div>"
End If
%>






Avatar of _Maddog_
_Maddog_
Flag of United States of America image

Hi Eric_Trogdon,

CDONTS has been deprecated on Win XP/2003 servers.
Use CDOSYS instead, some info here: http://www.hosting.fast-trak.net/tutorials/cdosys_asp_tutorial.htm

- Maddog
Avatar of Eric_Trogdon
Eric_Trogdon

ASKER

that go me past that error but now I get this error



Microsoft VBScript runtime error '800a01b6'

Object doesn't support this property or method: 'NewMailObj.Body'

/chefdaveorgdev/contact.asp, line 93


I'm using a variable to return the values of the data entered into the text boxes to produce an html email to the reciever. Does using this method support what I'm trying to do?

here is my variable

' create the HTML formatted email text
Dim sEmailText
sEmailText = sEmailText & "<html>"
sEmailText = sEmailText & "<head>"
sEmailText = sEmailText & "<title>HTML Email</title>"
sEmailText = sEmailText & "</head>"
sEmailText = sEmailText & "<body>"
sEmailText = sEmailText & "Feedback message from: " & sName & "<br>"
sEmailText = sEmailText & "Address:" & sAddress & "<br>"
sEmailText = sEmailText & "Message:" & sFeedback & "<br>"
sEmailText = sEmailText & "Date & Time:" & Now() & "<br>"
sEmailText = sEmailText & "IP :" & Request.ServerVariables("REMOTE_ADDR")
sEmailText = sEmailText & "</body>"
sEmailText = sEmailText & "</html>"

'create the mail object
Set NewMailObj=Server.CreateObject("CDO.Message")
NewMailObj.From=sEmail
NewMailObj.To = "etrogdon@gmail.com"
NewMailObj.Subject = "Feedback"
NewMailObj.Body = sEmailText <-------Line 93
NewMailObj.BodyFormat = 0
NewMailObj.MailFormat = 0
NewMailObj.Send
Set NewMailObj=Nothing

Response.write "<div align='center'>Thank you for sending your feedback.<br>"
Response.write "We will get back to you if necessary.</div>"
End If
%>





it has, but you can still use it.  You would need to find the DLL file to downoad it, then register it using regsvr32
Eric_Trogdon,
> Object doesn't support this property or method: 'NewMailObj.Body'

The URL I gave has some useful examples on using CDOSYS.
It's a bit different, but similarly simple.

- Maddog
thanks maddog. I'm serching the link currently any other links that would help?
ASKER CERTIFIED SOLUTION
Avatar of _Maddog_
_Maddog_
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks maddog works perferct. Been a long time since I've done any coding. Having to learn all over again.