|
 |
asp_cdo thread: Newbie CDOSYS Question
Message #1 by "Dave Welsh" <davewelsh79@h...> on Fri, 12 Oct 2001 21:40:02
|
|
Hi. I've been using CDONTS on my site, but now I'm working on and XP
server and I don't have CDONTS so I want to use CDOSYS.
I tried to use a code snipet but it came back with the error:
ADODB.Fields error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name
or ordinal.
I have the following code in my page:
Set objConfiguration = CreateObject("CDO.Configuration")
Set objFields = objConfiguration.Fields
With objFields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServerPort) = 25
.Item(cdoSMTPServer) = "localhost"
.Update
End With
Set objMessage = CreateObject("CDO.Message")
With objMessage
Set .Configuration = objConfiguration
.From = "me@m..."
.To = "davewelsh79@h..." 'myself
.Subject = "Here comes a Subject"
.HTMLBody = "<html><body>Here is an HTML body!</body></html>"
.AutoGenerateTextBody = False
.TextBody = "Here is a text body"
.Send
End With
The error above says it's referring to line 16 which is
.Item(cdoSendUsingMethod) = cdoSendUsingPort
Now for the newbiest question I've asked in a long time: Do I need
exchange server to use CDOSYS? I was able to use CDONTS with the SMTP
server that comes with IIS when I was using Windows 2000.
Message #2 by "Siegfried Weber" <sweber@c...> on Fri, 12 Oct 2001 23:55:55 +0200
|
|
You don't need Exchange server for CDOSYS. CDOSYS requires a machine
running Windows 2000 or higher only. The problem you are facing is the
missing declaration of the constants. Put the following on top of your
.ASP file to get those working:
<!--METADATA TYPE=3D"typelib"
UUID=3D"CD000000-8B95-11D1-82DB-00C04FB1625D"
NAME=3D"CDO for Windows 2000 Library" -->
<!--METADATA TYPE=3D"typelib"
UUID=3D"00000205-0000-0010-8000-00AA006D2EA4"
NAME=3D"ADODB Type Library" -->
Watch the line breaks!
Cheers,
--
<Siegfried />
> -----Original Message-----
> From: Dave Welsh [mailto:davewelsh79@h...]
> Sent: Friday, October 12, 2001 11:40 PM
> To: ASP CDO
> Subject: [asp_cdo] Newbie CDOSYS Question
>
> Hi. I've been using CDONTS on my site, but now I'm working on and XP
> server and I don't have CDONTS so I want to use CDOSYS.
>
> I tried to use a code snipet but it came back with the error:
>
> ADODB.Fields error '800a0cc1'
> Item cannot be found in the collection corresponding to the requested
name
> or ordinal.
>
> I have the following code in my page:
>
> Set objConfiguration =3D CreateObject("CDO.Configuration")
> Set objFields =3D objConfiguration.Fields
>
> With objFields
> .Item(cdoSendUsingMethod) =3D cdoSendUsingPort
> .Item(cdoSMTPServerPort) =3D 25
> .Item(cdoSMTPServer) =3D "localhost"
> .Update
> End With
>
> Set objMessage =3D CreateObject("CDO.Message")
> With objMessage
> Set .Configuration =3D objConfiguration
> .From =3D "me@m..."
> .To =3D "davewelsh79@h..." 'myself
> .Subject =3D "Here comes a Subject"
> .HTMLBody =3D "<html><body>Here is an HTML body!</body></html>"
> .AutoGenerateTextBody =3D False
> .TextBody =3D "Here is a text body"
> .Send
> End With
>
> The error above says it's referring to line 16 which is
> .Item(cdoSendUsingMethod) =3D cdoSendUsingPort
>
> Now for the newbiest question I've asked in a long time: Do I need
> exchange server to use CDOSYS? I was able to use CDONTS with the SMTP
> server that comes with IIS when I was using Windows 2000.
Message #3 by jnehring@s... on Wed, 17 Oct 2001 00:41:26
|
|
Thank you! Thank you! Thank you! I had a script I could run on a test
machine, but for some reason, never on a server, althought it supposedly
has everything I needed. Adding these two metadata statements did the
trick. (They are a bit garbled, however).
> You don't need Exchange server for CDOSYS. CDOSYS requires a machine
> running Windows 2000 or higher only. The problem you are facing is the
> missing declaration of the constants. Put the following on top of your
> .ASP file to get those working:
>
> <!--METADATA TYPE=3D"typelib"
> UUID=3D"CD000000-8B95-11D1-82DB-00C04FB1625D"
> NAME=3D"CDO for Windows 2000 Library" -->
> <!--METADATA TYPE=3D"typelib"
> UUID=3D"00000205-0000-0010-8000-00AA006D2EA4"
> NAME=3D"ADODB Type Library" -->
|
|
 |