I am having trouble getting mail to send the message I attach the script below
#!/bin/bash wget http://digitalatoll.com/ rc=$? if [[ $rc != 0 ]] ; then # [email protected] SUBJECT="digitalatoll server down" # Email To ? EMAIL="[email protected]" # Email text/message EMAILMESSAGE="msg.txt" echo error on server! > msg.txt mail -s "$SUBJECT" -t "$EMAIL" < $EMAILMESSAGE rm msg.txt fi rm index.html

