fix: fix the issue where errors occur due to spaces in MAIL_SMTP_VARIABLES

This commit is contained in:
ttionya
2025-03-12 18:35:47 +08:00
parent d138633929
commit 624de52e87
+1 -1
View File
@@ -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