fix: use mail command

This commit is contained in:
ttionya committed 2023-07-02 22:27:30 +08:00
1 parent ed3970f8c2
commit 245085716e
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -82,7 +82,7 @@ function check_dir_exist() {
}
########################################
# Send mail by mailx.
# Send mail by s-nail.
# Arguments:
# mail subject
# mail content
@@ -94,7 +94,7 @@ function send_mail() {
local MAIL_VERBOSE="-v"
fi
echo "$2" | mailx ${MAIL_VERBOSE} -s "$1" ${MAIL_SMTP_VARIABLES} "${MAIL_TO}"
echo "$2" | mail ${MAIL_VERBOSE} -s "$1" ${MAIL_SMTP_VARIABLES} "${MAIL_TO}"
if [[ $? != 0 ]]; then
color red "mail sending failed"
else