Problem using CDONTS.dll error 807007e

I have a Windows 2003 Standard SP2 server running IIS version 6 with 1 custom website.
I am having trouble sending email using CDONTS.dll, below is a copy of the code from "":


Set MyCDONTSMail = Server.CreateObject("CDONTS.NewMail")
MyCDONTSMail.From= "Website<>"
MyCDONTSMail.To= Recipient
MyCDONTSMail.Subject= Subject

'-------------------------------------------------- Define Header -------------------------------------------------------------------
messagetext =       Messagetext & "<font face=verdana size='-2'><b>Autogenerated message from Hemelnet</b><br>"

'-------------------------------------------------- Define Message -----------------------------------------------------------------
messagetext =       Messagetext & "<font face=verdana size='-2'> ************************************************************************************************** <br><br>"
messagetext =       Messagetext & "<br>"&Subject&"<br>"
messagetext =       Messagetext & "<br>"&Details&"<br><br>"
messagetext =       Messagetext & "<br>"&LinkMsg&"<br><br>"
'----------------------------------------------------- Define Footer -------------------------------------------------------------------
messagetext =       Messagetext & "<font face=verdana size='-2'> ************************************************************************************************** <br>"
messagetext =       Messagetext & "<br><br>Kind regards <br><br>" & ProperName & "</font>"

' -----------------------------------------------------------------------------------------------------------------------------------------

MyCDONTSMail.BodyFormat = 0
MyCDONTSMail.MailFormat = 0                   
MyCDONTSMail.Body= messagetext
MyCDONTSMail.Importance= 1
set MyCDONTSMail=nothing

'=================================================== Record that email was sent =======================================

Set mailRS = Server.CreateObject("ADODB.Recordset") "SELECT * FROM SentMail", objConn, 3, 3
      mailRS("SentBy") = ProperName
      mailRS("SentFrom") = Section
      mailRS("Recipient") = Recipient
      mailRS("CCTo") = CCTo
      mailRS("Subject") = Subject
set mailRS = Nothing

<table width="600">


The code fails on line 11, which is:
Set MyCDONTSMail = Server.CreateObject("CDONTS.NewMail")

with the error:
error '800707e'
C:\INETPUB\WWWROOT\TESTENV\ADMIN\../includes/, line 11

This error suggests an issue with the registration of the CDONTS.dll file.
I have made sure that CDONTS.dll has been registered with the command:
regsvr32 C:\WINDOWS\System32\CDONTS.dll
Have un-registered and re-registered it again, also registered scrrun.dll, switched off the Anvti Virus temporarily.

Any ideas?


Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Brad HoweDevOps ManagerCommented:
I would suggest using CDOSYS. CDONTS is deprecated.

Same structure, just a supported dll for windows2003.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial

There can be only three reasons:

1. Check Default SMTP Virtual Server is running in IIS and configured properly
2. Assigned Everyone (Read, List and Write) permission to C:\Inetpub\mailroot\Pickup directory.
3. Give everyone (read) permission to cdonts.dll under C:\WINDOWS\System32\

Make sure  the cdonts.dll is already registered on your server.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.