Thanks, Intruder. As it turned out, simply stopping the service did not trigger the recovery action. No real surprise there, although I had hoped that stopping it outside the Control Panel *might* trigger it.
But when the service DID stop due to a failure, an Event was logged that pointed to syntactical errors in the script. I also found that I could simply double-click the script file (with its .vbs extension) and see the run-time errors.
The problem, as it turned out, is that the sample code did not quote the From and To addresses. The script would fail on the "@" as an invalid character.
Since this is a small piece of code, let me post it:
Code:
set objArgs = Wscript.Arguments
Set objEmail = CreateObject("CDO.Message")
objEmail.From = "someone@our.domain"
objEmail.To = "somebody@our.domain"
objEmail.Subject = objArgs(0) & " service is down"
objEmail.Textbody = "The service " & objArgs(0) & " has stopped."
objEmail.Send
set objArgs = nothing
set objEmail = nothing
This is saved as Mail.vbs. The Service's properties page has the Recovery tab, where on first, second, or subsequent failures you choose Run a File. In the Run File dialog, enter the path for Mail.vbs. Enter the Service name in the Command line parameter field. (The original tip suggested a parameter without spaces.)