Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - CDO.Message Errors

Reply
 
Old 12-02-2008   #1 (permalink)
ScottLoe


 
 

CDO.Message Errors

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="name@xxxxxx"
myMail.To="name@xxxxxx"
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 = "name@xxxxxx"
.From = "name@xxxxxx"
.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 = "name@xxxxxx" 'the destination
objCDOMail.From = "name@xxxxxx" '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.



My System SpecsSystem Spec
Old 12-03-2008   #2 (permalink)
heintz.larry


 
 

Re: CDO.Message Errors

On Dec 2, 12:07*pm, ScottLoe <Scott...@xxxxxx>
wrote:
Quote:

> 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="n...@xxxxxx"
> myMail.To="n...@xxxxxx"
> 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 = "n...@xxxxxx"
> * * * * .From = "n...@xxxxxx"
> * * * * .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 = "n...@xxxxxx" *'the destination
> * *objCDOMail.From = "n...@xxxxxx" * '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.
If i recall correctly Win2K Server/IIS 5 only works with CDONTS and
not CDOSYS. The CDOSYS was introduced in IIS5.X and later. I do know
you can still use CDONTS on IIS5.X and later by copying and
registering the CDONTS.DLL on the machine, but I am unsure is you can
take the CDOSYS.DLL and register it on the Win2K server machine and
have it work correctly. Has been a while since I have dealt with IIS5.

Larry
www.windowsadminscripts.com
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Send/Receive error message, but no "errors" are listed Vista mail
Message errors Vista mail
LOTS of "Message not found" errors using Storage Folders Live Mail
CustomValidator in GridView getting "no message" on errors .NET General
explorer errors, program errors, no task manager Vista performance & maintenance


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46