fix: fix the issue where errors occur due to spaces in MAIL_SMTP_VARIABLES
This commit is contained in:
+1
-1
@@ -104,7 +104,7 @@ function send_mail() {
|
|||||||
local MAIL_VERBOSE="-v"
|
local MAIL_VERBOSE="-v"
|
||||||
fi
|
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
|
if [[ $? != 0 ]]; then
|
||||||
color red "mail sending has failed"
|
color red "mail sending has failed"
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user