By "hanging" it is probably waiting for the body of the message as input on stdin.
echo "This is the message body" mail -s "This is the Subject" recipient@company.comor
using HERE i/o redirection:
mail -s "This is the Subject" recipient@company.com <<-END
This is the message body.
It can easily accommodate several lines.
and ${substitutions} work in the here-document.
END
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment