Link to home
Start Free TrialLog in
Avatar of CSLSKY
CSLSKY

asked on

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 "SendEmail.inc":

Dim MyCDONTSMail

Set MyCDONTSMail = Server.CreateObject("CDONTS.NewMail")
MyCDONTSMail.From= "Website<no-reply-possible@emaildomain.com>"
MyCDONTSMail.To= Recipient
MyCDONTSMail.Cc= CCTo
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
MyCDONTSMail.Send
set MyCDONTSMail=nothing

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

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


%>
<table width="600">

</table>



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/sendemail.inc, 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?

Thanks,
Steve

ASKER CERTIFIED SOLUTION
Avatar of Brad Howe
Brad Howe
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial