From 5e6151e3bf8aa13a3849997ed49953362887ff5a Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Sun, 8 Nov 2020 15:10:04 +0100 Subject: mcom: detect and report mmime errors Closes #191. --- mcom | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'mcom') diff --git a/mcom b/mcom index 7bb3ce6..f0de75c 100755 --- a/mcom +++ b/mcom @@ -92,6 +92,10 @@ do_mime() { else mmime -r <"$draft" >"$draftmime" fi + if [ $? -ne 0 ]; then + printf 'mcom: fix above errors before continuing\n' 1>&2 + rm -f "$draftmime" + fi } MBLAZE=${MBLAZE:-$HOME/.mblaze} @@ -450,7 +454,7 @@ while :; do continue fi else - if mmime -c <"$draft"; then + if mmime -c <"$draft" && ! [ "$automime" = 1 ]; then stampdate "$draft" if $sendmail <"$draft"; then if [ "$outbox" ]; then -- cgit 1.4.1