Page 1 of 1

Output of shell command in email notification

Posted: Thu Feb 18, 2016 1:25 pm
by cyclogenisis
Hello,

Would like to add the output of a shell execute stage to the body of a notification activity.

Currently I have setup as following:

Execute Stage ---> Notification Stage

Here is an image of the Notification Stage, as you see I am trying to add the command output of the execute stage to the body of the email.

http://imgur.com/7ks3q2h

However, when I receive the notification in my inbox all I see if the following:

"#Get_missing_data.#"

What am I doing wrong.? It would seem silly if this was not possible to do in the body yet you can do this in the email subject. Thanks in advance

Posted: Thu Feb 18, 2016 2:18 pm
by chulett
Silly it may be but I don't recall them ever adding the ability to parameterize the body of the email, unfortunately. Unless they've added that in more recent versions, the solution has been to take the DSSendMail routine and create a tweaked version of it to include that functionality.

Posted: Thu Feb 18, 2016 4:31 pm
by ray.wurlod
It remains true that the body can not be parameterized. However you can direct the output into a file (perhaps using tee command) and specify an attachment to the email. The pathname of the attachment CAN be parameterized.

Posted: Thu Feb 18, 2016 4:52 pm
by chulett
True that.

Posted: Fri Feb 19, 2016 12:39 pm
by cyclogenisis
Hi Ray, funny you suggest this as this is exactly what I implemented. I've set up the trigger on whether there was output from my command or not.