ahmedsoliman
02-19-2003, 07:40 PM
i created email processing asp file and run it under iis ver5.01 and win xp ,it give me this error:
Error Type:
Server object, ASP 0177 (0x800401F3)
Invalid class string
/test/send.asp, line 18
line 18 is :
Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
this is my full code:
<%
Dim strTo
Dim strSubject
Dim strBody 'Strings for recipient, subject, boby
Dim objCDOMail 'The CDO object
strFrom = Request.Form("From") 'Make sure the From field has no spaces.
strTo = Request.Form("to")
strSubject = Request.Form("subject")
strBody = Request.Form("body")
' Create an instance of the NewMail object.
Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
' Set the properties of the object
objCDOMail.From = StrFrom
objCDOMail.To = strTo
objCDOMail.Subject = strSubject
objCDOMail.Body = strBody
objCDOMail.Send
Set objCDOMail = Nothing
%>
<html>
<head><title>Sent Mail</title></head>
<body>
Your mail was sent to:<% = request("to") %><br>
The time that is was sent was: <% = Now %>
</body>
</html>
Error Type:
Server object, ASP 0177 (0x800401F3)
Invalid class string
/test/send.asp, line 18
line 18 is :
Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
this is my full code:
<%
Dim strTo
Dim strSubject
Dim strBody 'Strings for recipient, subject, boby
Dim objCDOMail 'The CDO object
strFrom = Request.Form("From") 'Make sure the From field has no spaces.
strTo = Request.Form("to")
strSubject = Request.Form("subject")
strBody = Request.Form("body")
' Create an instance of the NewMail object.
Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
' Set the properties of the object
objCDOMail.From = StrFrom
objCDOMail.To = strTo
objCDOMail.Subject = strSubject
objCDOMail.Body = strBody
objCDOMail.Send
Set objCDOMail = Nothing
%>
<html>
<head><title>Sent Mail</title></head>
<body>
Your mail was sent to:<% = request("to") %><br>
The time that is was sent was: <% = Now %>
</body>
</html>