Liberum Help Desk
The free, open source solution for the web-based help desk.

email problem

rated by 0 users
Answered (Verified) This post has 1 verified answer | 19 Replies | 3 Followers

Top 25 Contributor
13 Posts
nguyen9377@gmail.com posted on 06-24-2009 3:30 PM

Help please!!! I got this error message :

Application Error
Number: 70 (0x00000046)
Source: Microsoft VBScript runtime error
Description: Permission denied

My IIS server and Exchange 2003 server are both windows 2003. According to several posts listed here, i can use CDONT if i register its dll on my exchange server, right? I got this error when I use CDONT. here's my public.asp using CDONT:
*********************
Case 1 'CDONTS
  Set Mail = Server.CreateObject("CDONTS.NewMail")
  Mail.BodyFormat = 1 ' Text Only, 0 for HTML
  Mail.Subject = strSubject
  Mail.To = strToAddr
  Mail.Body = strBody
  Mail.Send(Cfg(cnnDB, "HDName") & "<" & Cfg(cnnDB, "HDReply") & ">")
  Set Mail = Nothing
**********************
This happens at the new.asp page when i click on "Submit Problem" button which takes me to the postnew.asp page. I'm using SQL server 2005, not Access.

Answered (Verified) Verified Answer

Top 25 Contributor
13 Posts

oh man..it doesn't let me write a long email :)

anyway, it's working now...there're 3 steps involved in order to use CDOSYS:

- add a record for CDOSYS on tblConfig_Email table

- under Configure Site, select CDOSYS

- update public.asp to use CDOSYS

All Replies

Top 10 Contributor
170 Posts

Hey, is the ticket getting written to the data base even though the submission fails?

Top 25 Contributor
13 Posts

sorry for  the confusion...yes, it's written to the database

Top 25 Contributor
13 Posts

in fact, it'll take me to postnew.asp page with no error if i disable the email

Top 10 Contributor
170 Posts

maybe there is a permission issues within IIS?  Have you checked the event logs to see if there isa any errors happening? 

Top 25 Contributor
13 Posts

ok...it's working now...here are what I did:

- insert CDOSYS in tblConfig_Email table

- under "Configure Site", select CDOSYS for email type

- insert this code (copied from kingvandal) into public.asp:

*****************

Case 5  ' CDOSYS
      DIM strIncomingMailServer, objCDOSYSMail, objCDOSYSCon
      'Create the e-mail server object
  strIncomingMailServer = Cfg(cnnDB, "SMTPServer")
  Set objCDOSYSMail = Server.CreateObject("CDO.Message")
      Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")

     'Set and update fields properties
  With objCDOSYSCon

        'Out going SMTP server
          .Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strIncomingMailServer
         'SMTP port
          .Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport")  = 25
         'CDO Port
          .Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
         'Timeout
          .Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
   .Fields.Update
   End With

  'Update the CDOSYS Configuration
  Set objCDOSYSMail.Configuration = objCDOSYSCon

  With objCDOSYSMail
    .From = Cfg(cnnDB, "HDName") & " <" & Cfg(cnnDB, "HDReply") & ">"
   .To = strToAddr
   .Subject = strSubject
   '.HTMLBody = strBody 'Set the e-mail body format (HTMLBody=HTML TextBody=Plain)
   .TextBody = strBody
    'Send the e-mail
   If NOT strIncomingMailServer = "" Then .Send
   End with

  'Close the server mail object
   Set objCDOSYSMail = Nothing

**************

Top 25 Contributor
13 Posts

oh man..it doesn't let me write a long email :)

anyway, it's working now...there're 3 steps involved in order to use CDOSYS:

- add a record for CDOSYS on tblConfig_Email table

- under Configure Site, select CDOSYS

- update public.asp to use CDOSYS

Top 25 Contributor
13 Posts

i got this code from kingvandal:

Case 5  ' CDOSYS
      DIM strIncomingMailServer, objCDOSYSMail, objCDOSYSCon
      'Create the e-mail server object
  strIncomingMailServer = Cfg(cnnDB, "SMTPServer")
  Set objCDOSYSMail = Server.CreateObject("CDO.Message")
      Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")

     'Set and update fields properties
  With objCDOSYSCon

        'Out going SMTP server
          .Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strIncomingMailServer
         'SMTP port
          .Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport")  = 25
         'CDO Port
          .Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
         'Timeout
          .Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
   .Fields.Update
   End With

  'Update the CDOSYS Configuration
  Set objCDOSYSMail.Configuration = objCDOSYSCon

  With objCDOSYSMail
    .From = Cfg(cnnDB, "HDName") & " <" & Cfg(cnnDB, "HDReply") & ">"
   .To = strToAddr
   .Subject = strSubject
   '.HTMLBody = strBody 'Set the e-mail body format (HTMLBody=HTML TextBody=Plain)
   .TextBody = strBody
    'Send the e-mail
   If NOT strIncomingMailServer = "" Then .Send
   End with

  'Close the server mail object
   Set objCDOSYSMail = Nothing

Top 25 Contributor
13 Posts

i got this code from kingvandal:

***********

Case 5  ' CDOSYS
      DIM strIncomingMailServer, objCDOSYSMail, objCDOSYSCon
      'Create the e-mail server object
  strIncomingMailServer = Cfg(cnnDB, "SMTPServer")
  Set objCDOSYSMail = Server.CreateObject("CDO.Message")
      Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")

     'Set and update fields properties
  With objCDOSYSCon

        'Out going SMTP server
          .Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strIncomingMailServer
         'SMTP port
          .Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport")  = 25
         'CDO Port
          .Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
         'Timeout
          .Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
   .Fields.Update
   End With

Top 25 Contributor
13 Posts

i've been trying to post the code that i got from kingvandal, but it doesn't let me... :(

Top 25 Contributor
13 Posts

i've been trying to post the code that i got from kingvandal but it doesn't let me... :(

Top 25 Contributor
13 Posts

Thanks a lot kingvandal...

Top 10 Contributor
170 Posts

Sorry bud, did nto know that was the same with sql as it was in access.. 

for me it was ID: 5 Type: CDOSYS

Good job figuring it out.

Top 10 Contributor
170 Posts

email me the code and I will try to post it.

Top 10 Contributor
170 Posts

-------------------------------------------------

Case 5  ' CDOSYS
      DIM strIncomingMailServer, objCDOSYSMail, objCDOSYSCon
      'Create the e-mail server object
  strIncomingMailServer = Cfg(cnnDB, "SMTPServer")
  Set objCDOSYSMail = Server.CreateObject("CDO.Message")
      Set objCDOSYSCon = Server.CreateObject ("CDO.Configuration")

     'Set and update fields properties
  With objCDOSYSCon

        'Out going SMTP server
          .Fields("
http://schemas.microsoft.com/cdo/configuration/smtpserver") = strIncomingMailServer
         'SMTP port
          .Fields("
http://schemas.microsoft.com/cdo/configuration/smtpserverport")  = 25
         'CDO Port
          .Fields("
http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
         'Timeout
          .Fields("
http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
   .Fields.Update
   End With

  'Update the CDOSYS Configuration
  Set objCDOSYSMail.Configuration = objCDOSYSCon

  With objCDOSYSMail
    .From = Cfg(cnnDB, "HDName") & " <" & Cfg(cnnDB, "HDReply") & ">"
   .To = strToAddr
   .Subject = strSubject
   '.HTMLBody = strBody 'Set the e-mail body format (HTMLBody=HTML TextBody=Plain)
   .TextBody = strBody
    'Send the e-mail
   If NOT strIncomingMailServer = "" Then .Send
   End with

  'Close the server mail object
   Set objCDOSYSMail = Nothing

Page 1 of 2 (20 items) 1 2 Next > | RSS
Copyright © Doug Luxem 2000-2010
Powered by Community Server (Non-Commercial Edition), by Telligent Systems