Help please!!! I got this error message :
Application ErrorNumber: 70 (0x00000046)Source: Microsoft VBScript runtime errorDescription: 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.
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
Hey, is the ticket getting written to the data base even though the submission fails?
sorry for the confusion...yes, it's written to the database
in fact, it'll take me to postnew.asp page with no error if i disable the email
maybe there is a permission issues within IIS? Have you checked the event logs to see if there isa any errors happening?
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
**************
i got this code from kingvandal:
***********
i've been trying to post the code that i got from kingvandal, but it doesn't let me... :(
i've been trying to post the code that i got from kingvandal but it doesn't let me... :(
Thanks a lot kingvandal...
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.
email me the code and I will try to post it.
------------------------------------------------- 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
-------------------------------------------------