Print Page | Close Window

I need help

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=21414
Printed Date: 29 March 2026 at 8:42am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: I need help
Posted By: joud
Subject: I need help
Date Posted: 27 September 2006 at 9:32am

i used asp to send an email to user and i wrote this code

Dim objCDOMail
       Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
       objCDOMail.From = " mailto:tbagis@kau.edu.sa - tbagis@kau.edu.sa "
       objCDOMail.To = " mailto:joud_islam@hotmail.com - joud_islam@hotmail.com "
       objCDOMail.Subject = "Enquiry sent from my web site"
       objCDOMail.BodyFormat = 0
       objCDOMail.MailFormat = 0
       objCDOMail.Body = "<h2>Hello</h2><br><b>This is my e-mail in HTML format</b>"
       objCDOMail.Importance = 1
       objCDOMail.Send
       Set objCDOMail = Nothing

 

but it didn't work and the page display this error:

Error Type:
Server object, ASP 0177 (0x800401F3)
Invalid class string

thank you




Replies:
Posted By: michael
Date Posted: 27 September 2006 at 2:11pm
If you are on XP it no longer supports CDONTS. User CDO.Mail or any other component you have installed.

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: joud
Date Posted: 30 September 2006 at 9:06am
yes i use widows Xp
 
so, where i can found the conponent?
 
thank you for your answer


Posted By: dpyers
Date Posted: 30 September 2006 at 4:34pm
CDO comes with Windows XP Pro. It's installed when you install iis/mail/ftp. Not part of the standard install, so you have to install them from yor windows CD.

-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: joud
Date Posted: 01 October 2006 at 8:57am

are you mean replace the statement of

Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
 
to
 
Set objCDOMail = Server.CreateObject("CDO.NewMail")
 
?
 
i did do that but also the error was
Invalid class string
 
thank you for your answer


Posted By: VBScript
Date Posted: 01 October 2006 at 9:42am
This is how i normally use the CDO class.

Dim objCDOMail
Set objCDOMail = Server.CreateObject("CDO.Message")
objCDOMail.From = "from@email"
objCDOMail.To = "to@email"
objCDOMail.Subject = "Subject"
objCDOMail.HTMLBody = "MESSAGE BODY"
  objCDOMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
  objCDOMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "SMTP SERVER"
  objCDOMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objCDOMail.Configuration.Fields.Update
objCDOMail.Send
Set objCDOMail = Nothing



-------------
http://www.james-r.co.uk" rel="no follow - James
http://www.gotrillian.com/?4498-20" rel="no follow - Trillian - M


Posted By: joud
Date Posted: 01 October 2006 at 12:28pm
i wrote the code that you are write but also there is an error
 
CDO.Message.1 (0x80040213)
The transport failed to connect to the server.
in line
objCDOMail.Send
 
 
 
thank you for you answer
 
i am waiting you


Posted By: dpyers
Date Posted: 01 October 2006 at 5:46pm
You have to replace "SMTP SERVER" with the path/name of your smtp server. - e.g. mail.example.com or localhost, etc.

-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: joud
Date Posted: 02 October 2006 at 8:46am

how can i know yhe path of the server?

are you mean this statement?
objCDOMail.Configuration.Fields.Item(" http://schemas.microsoft.com/cdo/configuration/smtpserver - http://schemas.microsoft.com/cdo/configuration/smtpserver ") = "localhost"
 
if you mean that i did do it but the error is still the sameCry
The transport failed to connect to the server.
 
 
thank you



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net