mcomp: check message before sending

pull/2/head
Christian Neukirchen 8 years ago
parent c4822a983b
commit 0e88f28e18

19
mcomp

@ -109,16 +109,21 @@ while :; do
c= c=
fi fi
else else
if sendmail -t <$draft; then if mmime -c <$draft; then
if [ "$outbox" ]; then if sendmail -t <$draft; then
mflag -d $draft if [ "$outbox" ]; then
mflag -d $draft
else
rm $draft
fi
exit 0
else else
rm $draft echo "mcomp: sendmail failed, kept draft $draft"
exit 2
fi fi
exit 0
else else
echo "mcomp: sendmail failed, kept draft $draft" echo "mcomp: message needs to be MIME-encoded first."
exit 2 c=
fi fi
fi fi
;; ;;

Loading…
Cancel
Save