Hi,
We send mail out from both alerts and tcl procs using the unix mail command.
From an alert, use the exec action. Echo out a mail message and then pipe it to the mail command:
exec {echo “this would be the body of the message” | mail -s “%A” address1@mail.com,address2@mail.com }
The %A variable contains information about the alert that triggered.
From a tcl proc you can do the same thing:
I usually setup arguments that will let us pass the email arguments into the procedure so we can change them without making changes to the code:
set email1 “default@mail.com”
keylget args ARGS.EMAIL1 email1
exec echo “body message” | mail -s “Subject” $email1
More than one email address?
exec echo “body message” | mail -s “Subject” “$email1 $email2 $emaill3”