From 82169cd896d541bace2aa0d6f715afa889ef1a5c Mon Sep 17 00:00:00 2001 From: szaimen Date: Mon, 26 Oct 2020 20:44:27 +0100 Subject: [PATCH] update send_mail to feature return values (#1623) --- lib.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib.sh b/lib.sh index 40ddc4e5..136a8cd6 100644 --- a/lib.sh +++ b/lib.sh @@ -1527,9 +1527,13 @@ send_mail() { if [ -n "$RECIPIENT" ] then print_text_in_color "$ICyan" "Sending '$1' to $RECIPIENT" - echo -e "$2" | mail --subject "NcVM - $1" "$RECIPIENT" + if echo -e "$2" | mail --subject "NcVM - $1" "$RECIPIENT" + then + return 0 + fi fi fi + return 1 } zpool_import_if_missing() {