ScottLoe
2008-12-02 18:07:01 UTC
I have a Windows 2000 SP4 Server with IIS 5.0 and SMTP installed. The SMTP
is set up to relay to my Exchange Server.
The following code worked fine until 2 weeks ago when I did a microsoft
update.
<%
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From="***@domain.com"
myMail.To="***@domain.com"
myMail.TextBody="This is a message."
myMail.Send
set myMail=nothing
%>
After I did the updates, I've been getting the following error:
Category=CDO.Message.1
Number=(0x80040220)
Description=The "SendUsing" configuration value is invalid.
I searched the internet for solutions and I changed the code to this:
<%
Dim iMsg
Dim iConf
Dim Flds
Const cdoSendUsingPort = 2
Const strSmartHost = "x.x.x.x"
'I tried using the IP of my Exchange Server and IP of the IIS SMTP
Set iMsg = CreateObject("CDO.Message")
Set iConf = iMsg.Configuration
With iConf.Fields
.item("http://schemas.microsoft.com/cdo/configuration/sendusing") =
cdoSendUsingPort
.item("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
strSmartHost
.item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Update
End With
With iMsg
.To = "***@domain.com"
.From = "***@domain.com"
.Subject = "Test message sent on: " & now()
.TextBody = "This is a test"
.Send
End With
set iMsg = Nothing
set iConf = Nothing
%>
When I ran this script, I did not get the email but I did get this error
message:
Category=
Number=(0x80040211)
Description=
For kicks I ran my old CDONTS script:
<%
Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
objCDOMail.To = "***@domain.com" 'the destination
objCDOMail.From = "***@domain.com" 'the sender
objCDOMail.Subject = "Test CDONTS"
'objCDOMail.TextBody = "test"
objCDOMail.Send 'fire off the email
set objCDOMail=nothing
%>
This worked fine. No errors and I received the test email using this CDONTS
script.
What can I do about the CDO.Message? I do not want to revert back to using
CDONTS.
is set up to relay to my Exchange Server.
The following code worked fine until 2 weeks ago when I did a microsoft
update.
<%
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From="***@domain.com"
myMail.To="***@domain.com"
myMail.TextBody="This is a message."
myMail.Send
set myMail=nothing
%>
After I did the updates, I've been getting the following error:
Category=CDO.Message.1
Number=(0x80040220)
Description=The "SendUsing" configuration value is invalid.
I searched the internet for solutions and I changed the code to this:
<%
Dim iMsg
Dim iConf
Dim Flds
Const cdoSendUsingPort = 2
Const strSmartHost = "x.x.x.x"
'I tried using the IP of my Exchange Server and IP of the IIS SMTP
Set iMsg = CreateObject("CDO.Message")
Set iConf = iMsg.Configuration
With iConf.Fields
.item("http://schemas.microsoft.com/cdo/configuration/sendusing") =
cdoSendUsingPort
.item("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
strSmartHost
.item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Update
End With
With iMsg
.To = "***@domain.com"
.From = "***@domain.com"
.Subject = "Test message sent on: " & now()
.TextBody = "This is a test"
.Send
End With
set iMsg = Nothing
set iConf = Nothing
%>
When I ran this script, I did not get the email but I did get this error
message:
Category=
Number=(0x80040211)
Description=
For kicks I ran my old CDONTS script:
<%
Set objCDOMail = Server.CreateObject("CDONTS.NewMail")
objCDOMail.To = "***@domain.com" 'the destination
objCDOMail.From = "***@domain.com" 'the sender
objCDOMail.Subject = "Test CDONTS"
'objCDOMail.TextBody = "test"
objCDOMail.Send 'fire off the email
set objCDOMail=nothing
%>
This worked fine. No errors and I received the test email using this CDONTS
script.
What can I do about the CDO.Message? I do not want to revert back to using
CDONTS.