I have a problem with stopping a service and starting it again and want to be notified when the process runs and let me know what the result is.
Here's the scenario, I have a text file output of an "sc" command. I want to send that file but not as an attachment. Also, I want to see the initial status quickly in the subject of the email.
Here's the 'servstop.txt' file contents:
[SC] StartService FAILED 1058:
The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.
I want the subject of the email to be "Alert Service Start: [SC] StartService FAILED 1058" and the body to contain the entire error message above.
I will put my current method in an answer below using a program called blat to send me the result.