update send_mail to feature return values (#1623)

This commit is contained in:
szaimen 2020-10-26 20:44:27 +01:00 committed by GitHub
parent 22b4edb9fe
commit 82169cd896
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

6
lib.sh
View File

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