mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-11-17 20:01:46 +00:00
try to use ACCOUNT_MAIL if MAIL_FROM is not set
This commit is contained in:
parent
d509ef7581
commit
7b6ebc5c98
@ -37,11 +37,21 @@ mail_send() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
MAIL_TO="${MAIL_TO:-$(_readaccountconf_mutable MAIL_TO)}"
|
MAIL_TO="${MAIL_TO:-$(_readaccountconf_mutable MAIL_TO)}"
|
||||||
if [ -z "$MAIL_TO" ]; then
|
if [ -n "$MAIL_TO" ]; then
|
||||||
MAIL_TO="$(_readaccountconf ACCOUNT_EMAIL)"
|
if ! _contains "$MAIL_TO" "@"; then
|
||||||
_info "The MAIL_TO is not set, so use the account email: $MAIL_TO"
|
_err "It seems that the MAIL_TO=$MAIL_TO is not a valid email address."
|
||||||
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_saveaccountconf_mutable MAIL_TO "$MAIL_TO"
|
_saveaccountconf_mutable MAIL_TO "$MAIL_TO"
|
||||||
|
else
|
||||||
|
MAIL_TO="$(_readaccountconf ACCOUNT_EMAIL)"
|
||||||
|
|
||||||
|
if [ -z "$MAIL_TO" ]; then
|
||||||
|
_err "It seems that account email is empty."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
contenttype="text/plain; charset=utf-8"
|
contenttype="text/plain; charset=utf-8"
|
||||||
subject="=?UTF-8?B?$(echo "$_subject" | _base64)?="
|
subject="=?UTF-8?B?$(echo "$_subject" | _base64)?="
|
||||||
|
Loading…
Reference in New Issue
Block a user