From 624de52e876c42ad756d2e899bfff3e9ef057f9d Mon Sep 17 00:00:00 2001 From: ttionya Date: Wed, 12 Mar 2025 18:35:47 +0800 Subject: [PATCH] fix: fix the issue where errors occur due to spaces in MAIL_SMTP_VARIABLES --- scripts/includes.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/includes.sh b/scripts/includes.sh index 2e27827..4faa888 100644 --- a/scripts/includes.sh +++ b/scripts/includes.sh @@ -104,7 +104,7 @@ function send_mail() { local MAIL_VERBOSE="-v" fi - echo "$2" | mail ${MAIL_VERBOSE} -s "$1" ${MAIL_SMTP_VARIABLES} "${MAIL_TO}" + echo "$2" | eval "mail ${MAIL_VERBOSE} -s \"$1\" ${MAIL_SMTP_VARIABLES} \"${MAIL_TO}\"" if [[ $? != 0 ]]; then color red "mail sending has failed" else