Link to home
Start Free TrialLog in
Avatar of webitservices
webitservicesFlag for United States of America

asked on

Vbscript help with BLAT command line email

Can someone please help with this smaill script.  Basically I put it at the end of my scripts so that it will email me when finished.  I can also take it one step further and attach files to emails such as logs with BLAT but in this case I am not doing it.  I am sure the problem is with the single quotes and double quotes but me not knowing much about scripting is why I need an experts helps.

Any help would be appreciated.

Thanks,
Chad
'Send email when done
Set WshShell = WScript.CreateObject("WScript.Shell")
 
WshShell.Run"blat -to backups@myemail.com -subject "test 1 2 3" -body "test 1 2 3""
 
'clear out wshshell variable
set wshShell = nothing

Open in new window

Avatar of webitservices
webitservices
Flag of United States of America image

ASKER

one other note is I tried the single quotes as per the attached code snippet but still doesnt work.
WshShell.Run"blat -to backups@myemail.com -subject 'test 1 2 3' -body 'test 1 2 3'"

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of RobSampson
RobSampson
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Works like a charm...thanks for your help!

Chad
No problem.  Thanks for the grade.

Regards,

Rob.