Check exit code directly

This commit is contained in:
Enno Rehling 2017-12-03 16:42:14 +01:00
parent 0857e363e5
commit a02c80cf76
1 changed files with 3 additions and 4 deletions

View File

@ -43,8 +43,7 @@ done
addr=$1
subject=$2
shift 2
mutt -F "$ERESSEA/etc/muttrc" -s "$subject" -a "$@" -- "$addr" < "$TEMPLATE"
if [ $? -ne 0 ] ; then
echo "Sending failed for email/report: $2/$3"
fi
mutt -F "$ERESSEA/etc/muttrc" -s "$subject" -a "$@" -- "$addr" \
< "$TEMPLATE" || echo "Sending failed for email/report: $2/$3"