Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_cdo thread: CDO and XP what a ....???


Message #1 by vampage2@h... on Tue, 26 Mar 2002 08:45:24
Hey people,

I am trying to send mail with the simple CDO method.  Now i'm running XP 
Pro, ISS 5.1 and have SMTP installed. The code i am using is...

Set objMessage = CreateObject("CDO.Message")
With objMessage
	.From = "info@m..."
	.To = "darren@m..."
	.Subject = "YourSubject"
	'.TextBody = "YourTextBody"
	.Send
End With

this code was taken straight from one of the other solutions given by 
Siegfried to a similar problem.  The error message i'm getting is

CDO.Message.1 (0x80040220)
The "SendUsing" configuration value is invalid. 

I don't have any clue what this means, and really haven't found any 
documentation on this error...

Can anyone enlighten me, please...

Regards,

Darren
Message #2 by "Siegfried Weber" <sweber@c...> on Tue, 26 Mar 2002 23:06:44 +0100
I think I mentioned (and it should be in the archives of this list) that
a CDO.Configuration is also necessary. This configuration object holds
all settings to submit the message and AFAIK on Win.XP it requires to
specify the server with port instead of a local pickup directory.

Here's it again:

Set objConfiguration =3D CreateObject("CDO.Configuration")
Set objFields =3D objConfiguration.Fields
With objFields
       .Item(cdoSendUsingMethod) =3D cdoSendUsingPort
       .Item(cdoSMTPServerPort) =3D 25
       .Item(cdoSMTPServer) =3D "myservername.mydomain.com"
       .Update
End With

Set objMessage =3D CreateObject("CDO.Message")
With objMessage
       Set .Configuration =3D objConfiguration
       .From =3D "me@m..."
       .To =3D "vahnid@h..."
       .Subject =3D "Here comes a Subject"
       .TextBody =3D "Here is a text body"
       .Send
End With

<Siegfried />

> -----Original Message-----
> From: vampage2@h... [mailto:vampage2@h...]
> Sent: Tuesday, March 26, 2002 9:45 AM
> To: ASP CDO
> Subject: [asp_cdo] CDO and XP what a ....???
>
> Hey people,
>
> I am trying to send mail with the simple CDO method.  Now i'm running
XP
> Pro, ISS 5.1 and have SMTP installed. The code i am using is...
>
> Set objMessage =3D CreateObject("CDO.Message")
> With objMessage
> 	.From =3D "info@m..."
> 	.To =3D "darren@m..."
> 	.Subject =3D "YourSubject"
> 	'.TextBody =3D "YourTextBody"
> 	.Send
> End With
>
> this code was taken straight from one of the other solutions given by
> Siegfried to a similar problem.  The error message i'm getting is
>
> CDO.Message.1 (0x80040220)
> The "SendUsing" configuration value is invalid.
>
> I don't have any clue what this means, and really haven't found any
> documentation on this error...
>
> Can anyone enlighten me, please...
>
> Regards,
>
> Darren

  Return to Index