fix: use mail command
This commit is contained in:
2 files changed
+3
-3
No files matched your search
@@ -9,7 +9,7 @@ if [[ "$1" == "rclone" ]]; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# mailx test
|
# mail test
|
||||||
if [[ "$1" == "mail" ]]; then
|
if [[ "$1" == "mail" ]]; then
|
||||||
export_env_file
|
export_env_file
|
||||||
init_env_mail
|
init_env_mail
|
||||||
|
|||||||
+2
-2
@@ -82,7 +82,7 @@ function check_dir_exist() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
########################################
|
########################################
|
||||||
# Send mail by mailx.
|
# Send mail by s-nail.
|
||||||
# Arguments:
|
# Arguments:
|
||||||
# mail subject
|
# mail subject
|
||||||
# mail content
|
# mail content
|
||||||
@@ -94,7 +94,7 @@ function send_mail() {
|
|||||||
local MAIL_VERBOSE="-v"
|
local MAIL_VERBOSE="-v"
|
||||||
fi
|
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
|
if [[ $? != 0 ]]; then
|
||||||
color red "mail sending failed"
|
color red "mail sending failed"
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in new issue
Block a user