I know the code below works, but I do not want to employ the empty
file, "admtest_session_empty_file.lst".
#Send a message if the session count is high.
if [ $count_sessions -gt 60 ]
then
mail -s "INSTANCE sessions high: $count_sessions"
xxx...@xxxxx.com yyy...@yyypage.yyyy.com zzz...@zzzzz.com
<admtest_session_empty_file.lst
fi
Thank you,
Bill
Hi Bill,
My first reaction would be to use\
echo | mail -s ...
which should send an e-mail with just an empty line as body. You could
alse experiment with "echo -n" and see how mail reacts.
Regards,
Alvin.
use Nagios - it's free :)
Try this:
$ true | mail -s "no body just subject" wis...@gmail.com
Null message body; hope that's ok
Kind regards.
Marcin
Thank you Alvin, Henry, and Marcin.
I tried both echo and true. What worked for me was:
echo|mail –s “message text” xxxx...@xxxxx.com yyy...@yyypage.yyyy.com
zzzz...@zzzzz.com
The message created with:
true|mail –s “message text” xxxx...@xxxxx.com yyy...@yyypage.yyyy.com
zzzz...@zzzzz.com
produced an email that look good, but the electronic page included the
following message body:
“<html><body></body></html>”
That matched the results produced by using the mail command alone, and
omitting any reference to the body.
Thank you all for your suggestions.
Bill