VBScript code..Need your input


kbSU89

New Member
Need help. I wrote a VBscript from my application to send an html file and it is failing on the send. Here is my code

Set theMailItem = CreateObject("CDO.Message")
theMailItem.To = "kerril_brown@co.harris.tx.us"
theMailItem.Subject = "Email"
theMailItem.TextBody = "Email"
theMailItem.AddAttachment "c:\Documents and Settings\kcbrown\My Documents\Rational Clear Quest\email.htm"
theMailItem.Send

I get an a error stating the SendUsing Configuration is invalid

Help

Thanks
 
I copied your code to a notepad session and saved it as a .vbs (VB Script file) and it didn't like that you didn't have a from e-mail address.
 

Da_Sperm said:
I copied your code to a notepad session and saved it as a .vbs (VB Script file) and it didn't like that you didn't have a from e-mail address.


Thanks, I will add the from and see what happens
 
89comSUgrad said:
Need help. I wrote a VBscript from my application to send an html file and it is failing on the send. Here is my code

Set theMailItem = CreateObject("CDO.Message")
theMailItem.To = "kerril_brown@co.harris.tx.us"
theMailItem.Subject = "Email"
theMailItem.TextBody = "Email"
theMailItem.AddAttachment "c:\Documents and Settings\kcbrown\My Documents\Rational Clear Quest\email.htm"
theMailItem.Send

I get an a error stating the SendUsing Configuration is invalid

Help

Thanks

Wow. It has been a hot minute since I worked with VBScript. Don't you have to set the SMTP server somewhere?
 
Killer Bees said:
Wow. It has been a hot minute since I worked with VBScript. Don't you have to set the SMTP server somewhere?

I think that was part of what was required for the to/fro/* validity chex.

:tup: :uhoh:
 
Back
Top