Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

The "SendUsing" configuration value is invalid 1

Status
Not open for further replies.

barttabac

Programmer
Feb 16, 2004
5
FR
Hello,
I'm trying to send e-mail thanks CDO :

loMsg = createobject ("CDO.Message")
WITH loMsg
.To = "xxx@yyy.com"
.Subject = "Subject"
ENDWITH
loMsg.send

But I've got an error on Send :
"The "SendUsing" configuration value is invalid"

I use Win2000 and Outlook2000 (but no Exchange Server) and I've got cdosys.dll and cdonts.dll in my system32.

It was working with Win2000 and Outlook Express, but it doesn't work since I installed Outlook2000.

Any help on this ?

thanks in advance
 
You'll have to research the "configuration" object that
is part of the CDO.Message object model.

Darrell
 
I have wondered about this myself, and just haven't found time to look into it until now. Here is a working example...i tested it here at my end and it worked great. You will need to modify the code to suit your situation.

Code:
*!* For a little more information on this configuration object
*!* being used here
*!* [URL unfurl="true"]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cdosys/html/_cdosys_schema_configuration.asp[/URL]

Local lcSchema, loConfig, loMsg
lcSchema = "[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/"[/URL]

loConfig = CREATEOBJECT("CDO.Configuration")

WITH loConfig.FIELDS
	.ITEM(lcSchema + "smtpserverport") = 25 && SMTP Port
	.ITEM(lcSchema + "sendusing") = 2 && Send it using port
	.ITEM(lcSchema + "smtpserver") = "mail.myhost.com" && host of smtp server
	.ITEM(lcSchema + "smtpauthenticate") = 1 && Authenticate
	.ITEM(lcSchema + "sendusername") = "VaLiDUserNaMe" && Username
	.ITEM(lcSchema + "sendpassword") = "PaSsWoRd1234" && Password
	.UPDATE
ENDWITH

loMsg = CREATEOBJECT ("CDO.Message")
loMsg.Configuration = loConfig
WITH loMsg
	.FROM = "me@myisp.com"
	.TO = "someaddy@someisp.com"
	.Subject = "Subject"
ENDWITH

loMsg.SEND()

loConfig = NULL
loMsg = NULL

Slighthaze = NULL
[sub]craig1442@mchsi.com[/sub][sup]
"Whom computers would destroy, they must first drive mad." - Anon​
[/sup]
 
Big Star for you!

Hadn't taken the time to figure out the configuration
object myself. Thanks!

That allows me to fix some server related code I've
been working on.

Darrell
 
slighthaze

Isn't your solution used for Exchange Server (ie> username and password) where barttabac specified :I use Win2000 and Outlook2000 (but no Exchange Server).

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Mike,

Not necessarily Exchange Server...but yes, you do have to have access to an SMTP server to use it. I myself am currently running MAILENABLE (I have found it has the best features and best GUI, though it can flake out at times), also you could use ARGOSOFT, or if you like Apache stuff then you could check out JAMES. There are plenty of Freeware SMTP servers out there...but you are absolutely right Mike, my solution does not necessarily pertain to barttabac's situation...it does however shed some light on the whole issue of the sendusing error and as such I thought it might be helpful to dig in and figure this thing out.

Slighthaze = NULL
[sub]craig1442@mchsi.com[/sub][sup]
"Whom computers would destroy, they must first drive mad." - Anon​
[/sup]
 
Just a note.

After playing a little I noticed that I can send email
within the network, but couldn't send outside.
(Got an 'unable to relay for emailaddress@somewhere.com)

I'll have to dig in and see why my Exchange Server won't
allow.

Darrell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top