ASPMail doesn't work: SOE 'ASP 0177 : 800401f3' Server.CreateObject Failed

newyorkny used Ask the Experts™
I am working on IIS 6...and I cannot even find the dll smtpsvg.dll when I run regsvr32...

My createobject fails everytime :(.  I first started dickering around with permissions, then I realized the dll isn't even on the server.  What mind-bogglingly basic error am I making here?

Set Msg = server.createobject("CDONTS.Newmail")

Thanks for any guidance! :)

Why is ASP being such a Scrooge????  Pick yourself up 375 points!  Just what you wanted for Christmas! :)

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
If you're using Windows 2003 Server you need to use Server.CreateObject("CDO.Message")")

CDo runs on Windows 2003, CDONTs does not.

Here is the code I use:  I wouldn't screw around with the configuration as mentioned...alwasy seems to mess it up.  All default should work fine with your host:

Code below works, I use it: uses port 25, no configuration. Had problem with configuration on local machine.

strTo = ""    'Make sure the From field has no spaces.
strFrom = ""
strSubject = "Your Subject"
strBody = "The content of email"

' Create an instance of the NewMail object.
Set objCDOMail = Server.CreateObject("CDO.Message")
' Set the properties of the object
objCDOMail.Sender = StrFrom
objCDOMail.To = strTo
objCDOMail.Subject = strSubject
objCDOMail.TextBody = strBody

' Some of the more useful ones I've included samples of here:
'objCDOMail.Cc = ";"   Notice this sending to more than one person!
'objCDOMail.Bcc = ";"
'objCDOMail.Importance = 1

'objCDOMail.AttachFile "c:\path\filename.txt", "filename.txt"

' Send the message!

' Set the object to nothing because it immediately becomes
' invalid after calling the Send method + it clears it out of the Server's Memory.
Set objCDOMail = Nothing


Looks great!  I'll swap out some DONTs and get back to ya! :)


Thanks.  I am going to accept this answer!

I invite you to participate in my next thread, which will be asking for help swapping CDONTS for CDOS.

Happy Boxing Day!

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