Hi,

I'm not very familiar with using vbScript and MS Office products. Can
someone point me in the right direction regarding an error I am receiving
when trying to send an email? The error I am getting is "The 'SendUsing'
configuration value is invalid."

My code looks like this:

Set oMyMail = CreateObject("CDO.Message")
oMyMail.To = "user@test.com"
oMyMail.Subject = "Test Mail from script"
oMyMail.Textbody = "Please ignore"
oMyMail.AddAttachment "C:\output.txt"
oMyMail.MIMEFormatted = False
oMyMail.Send
WScript.Echo "Message Sent From : " & oMyMail.From
WScript.Echo " to : " & oMyMail.To

I don't know if this is significant, but I'm using an Exchange 5.5 server, I
have Outlook 2002 running as my client, and I am logged in as a
non-Administrator.

Thanks in Advance,
JeffH

RE: Sending an email message by ESP

ESP
Mon Nov 28 10:12:03 CST 2005

No SMTP service installed on that machine. You'll have to point to one. You
can use something like this from the MS Scripting Center to get you started.

ESP

Set objEmail = CreateObject("CDO.Message")
objEmail.From = "admin1@fabrikam.com"
objEmail.To = "admin2@fabrikam.com"
objEmail.Subject = "Server down"
objEmail.Textbody = "Server1 is no longer accessible over the network."
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _
"smarthost"
objEmail.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objEmail.Configuration.Fields.Update
objEmail.Send






"JeffH" wrote:

> Hi,
>
> I'm not very familiar with using vbScript and MS Office products. Can
> someone point me in the right direction regarding an error I am receiving
> when trying to send an email? The error I am getting is "The 'SendUsing'
> configuration value is invalid."
>
> My code looks like this:
>
> Set oMyMail = CreateObject("CDO.Message")
> oMyMail.To = "user@test.com"
> oMyMail.Subject = "Test Mail from script"
> oMyMail.Textbody = "Please ignore"
> oMyMail.AddAttachment "C:\output.txt"
> oMyMail.MIMEFormatted = False
> oMyMail.Send
> WScript.Echo "Message Sent From : " & oMyMail.From
> WScript.Echo " to : " & oMyMail.To
>
> I don't know if this is significant, but I'm using an Exchange 5.5 server, I
> have Outlook 2002 running as my client, and I am logged in as a
> non-Administrator.
>
> Thanks in Advance,
> JeffH
>
>
>