CDO Mail

D

Drew

I am trying to setup an error reporting system for our Intranet. We have a
Windows 2000 Server with SQL Server and we have an Exchange Server 5.5. I
need to set it up so I can use CDO mail. I have used CDO before, but have
never set it up to work. I built a small little page with some CDO code on
it, but I get an error when I try to run it. How can I set this up to send
mail from the webserver to people in our facility?

Thanks,
Drew
 
D

Drew

Sorry about the lack of details, I was trying to get the question out there
before I left for lunch...

Here is the code snippet I used.

<%
Dim objCDO
Set objCDO = Server.CreateObject("CDONTS.NewMail")

objCDO.To = "drew.laingATNOSPAMswvtc.dmhmrsas.virginia.gov"
objCDO.From = "adminATNOSPAMswvtc.dmhmrsas.virginia.gov"

Dim txtSubject
txtSubject = "TESTING CDO Mail"

objCDO.Subject = "TEST"
objCDO.Body = txtSubject
objCDO.Send
%>

(I of course used @ instead of ATNOSPAM, just trying to keep my email addy
from those email address robots!)

Here is the error I received,

Error Type:
(0x80090020)
An internal error occurred.
/swvtc/cdotest.asp, line 15

Line 15 is, objCDO.Send

Thanks,
Drew
 
D

Drew

If I use the following code,

<%
sch = "http://schemas.microsoft.com/cdo/configuration/"

Set cdoConfig = CreateObject("CDO.Configuration")

With cdoConfig.Fields
.Item(sch & "sendusing") = 2 ' cdoSendUsingPort
.Item(sch & "smtpserver") = "<enter_mail.server_here>"
.update
End With

Set cdoMessage = CreateObject("CDO.Message")

With cdoMessage
Set .Configuration = cdoConfig
.From = "adminATNOSPAMswvtc.dmhmrsas.virginia.gov"
.To = "drew.laingATNOSPAMswvtc.dmhmrsas.virginia.gov"
.Subject = "Sample CDO Message"
.TextBody = "This is a test for CDO.message"
.Send
End With

Set cdoMessage = Nothing
Set cdoConfig = Nothing
%>

I get this error,

Error Type:
Microsoft VBScript runtime (0x800A0030)
Error in loading DLL: 'cdoConfig.Fields'
/swvtc/cdotest.asp, line 7

Thanks,
Drew
 
D

Drew

I will, but since I am only the "humble programmer" and I don't have any
control over the server, I will have to wait until tommarow, or maybe the
beginning of next week. I really appreciate your time and help on this
issue. If I continue to have problems after reinstalling scripting engine
5.6, I will post again.

Thanks,
Drew
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top