From 245085716e326e427d07b75194dc040f4e447433 Mon Sep 17 00:00:00 2001 From: ttionya Date: Sun, 2 Jul 2023 22:27:30 +0800 Subject: [PATCH] fix: use mail command --- scripts/entrypoint.sh | 2 +- scripts/includes.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/entrypoint.sh b/scripts/entrypoint.sh index 88a1baf..67047e2 100644 --- a/scripts/entrypoint.sh +++ b/scripts/entrypoint.sh @@ -9,7 +9,7 @@ if [[ "$1" == "rclone" ]]; then exit 0 fi -# mailx test +# mail test if [[ "$1" == "mail" ]]; then export_env_file init_env_mail diff --git a/scripts/includes.sh b/scripts/includes.sh index 9493b0f..7e5708f 100644 --- a/scripts/includes.sh +++ b/scripts/includes.sh @@ -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