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() {