Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - I need help
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

I need help

 Post Reply Post Reply Page  12>
Author
joud View Drop Down
Newbie
Newbie


Joined: 27 September 2006
Location: Saudi Arabia
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote joud Quote  Post ReplyReply Direct Link To This Post Topic: I need help
    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 = "tbagis@kau.edu.sa"
       objCDOMail.To = "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

Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
joud View Drop Down
Newbie
Newbie


Joined: 27 September 2006
Location: Saudi Arabia
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote joud Quote  Post ReplyReply Direct Link To This Post Posted: 30 September 2006 at 9:06am
yes i use widows Xp
 
so, where i can found the conponent?
 
thank you for your answer
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post 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.

Edited by dpyers - 30 September 2006 at 4:35pm

Lead me not into temptation... I know the short cut, follow me.
Back to Top
joud View Drop Down
Newbie
Newbie


Joined: 27 September 2006
Location: Saudi Arabia
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote joud Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
VBScript View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2004
Location: United Kingdom
Status: Offline
Points: 219
Post Options Post Options   Thanks (0) Thanks(0)   Quote VBScript Quote  Post ReplyReply Direct Link To This Post 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

Back to Top
joud View Drop Down
Newbie
Newbie


Joined: 27 September 2006
Location: Saudi Arabia
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote joud Quote  Post ReplyReply Direct Link To This Post 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


Edited by joud - 01 October 2006 at 12:30pm
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.