Server.CreateObject("CDONTS.NewMail")

wanaBguru
wanaBguru used Ask the Experts™
on
im trien to do this asp cdonts mail thing....
this isthe error i get

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

im running this script on my own server
ive tried searching for it on msdn and google...

nothing....so it thought id ask sum pros...
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
I'm not sure what the error is but I can give you a few trouble shooting tips on this.

1.) Make sure the cdonts.dll is installed. You can check by doing a search on your computer.

2.) Make sure SMTP is running on the server.

3.) Is your code correct? Below is a code what it shoud look like in ASP.

Set objNewMail = server.CreateObject("CDONTS.NewMail")
With objNewMail
  .From = "someone@somedomain.com"
  .To = "GOINGTOsomeone@somedomain.com"
  .CC = "CARBONCOPYsomeone@somedomain.com"
  .Subject = "This will appear in the subject line"
  .Importance = "Priority level of low,medium,high"
  .Body = "The mail message is inside here"
  .Send
Set objNewMail = Nothing

I hope that helped.

Greg

Author

Commented:
yep uv helped allot...i now know i need that cdonts.dll...whre can i find it? ive tried my windows xp disk, for addition components...and searched..all i can find it tutorials on cdonts but no file :|

Author

Commented:
cool thanks dude...been a great help...i dont have cdonts on my system...how ever this is for a school project and the server at school which this script will be run on has it :))) stoked...and it works

once again thanks.

I believe you must have the smtp service running

Commented:
Hey man, no problem :) .

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial