| |
bellpr
Posts: 1
Score: 0
Joined: 12/15/2004
From: USA
Status: offline
|
[V]I am trying to get the contents of a text file to be the body of an E-mail. I am passing the text file names as an argument to the VBS file. Right now all IÒm getting is the file name as the Body of my E-mail. What I am I missing? See example below of emailthis.vbs Set objEmail = CreateObject("CDONTS.NewMail") objEmail.From = "from addr goes here" objEmail.To = WScript.Arguments(0) objEmail.Subject = WScript.Arguments(1) objEmail.Body = WScript.Arguments(2) objEmail.AttachFile WScript.Arguments(3) objEmail.Send set objEmail = Nothing Command line calling the VBS looks like this emailthis.vbs "someone@unknown.com", "this is the subject", "Text file goes here", "attachment" I need to take arugment #2 which is the text file I want to use, and take the text out of the file (argument2) and make it the body of the E-mail.
|
|