mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-05-14 22:54:12 +00:00
fix _MAILGUN_BASE for US region
This commit is contained in:
parent
9ab318cafc
commit
04b811e9ac
@ -28,14 +28,23 @@ mailgun_send() {
|
|||||||
_saveaccountconf_mutable MAILGUN_API_KEY "$MAILGUN_API_KEY"
|
_saveaccountconf_mutable MAILGUN_API_KEY "$MAILGUN_API_KEY"
|
||||||
|
|
||||||
MAILGUN_REGION="${MAILGUN_REGION:-$(_readaccountconf_mutable MAILGUN_REGION)}"
|
MAILGUN_REGION="${MAILGUN_REGION:-$(_readaccountconf_mutable MAILGUN_REGION)}"
|
||||||
if [ -z "$MAILGUN_REGION" ]; then
|
case "$MAILGUN_REGION" in
|
||||||
MAILGUN_REGION=""
|
[Uu][Ss] | "")
|
||||||
_debug "The MAILGUN_REGION is not set, so use the default us region."
|
if [ -z "$MAILGUN_REGION" ]; then
|
||||||
_MAILGUN_BASE="https://api.mailgun.net/v3"
|
_debug "The MAILGUN_REGION is not set, so use the default us region."
|
||||||
else
|
fi
|
||||||
_saveaccountconf_mutable MAILGUN_REGION "$MAILGUN_REGION"
|
MAILGUN_REGION=""
|
||||||
_MAILGUN_BASE="https://api.eu.mailgun.net/v3"
|
_MAILGUN_BASE="https://api.mailgun.net/v3"
|
||||||
fi
|
;;
|
||||||
|
[Ee][Uu])
|
||||||
|
_saveaccountconf_mutable MAILGUN_REGION "$MAILGUN_REGION"
|
||||||
|
_MAILGUN_BASE="https://api.$MAILGUN_REGION.mailgun.net/v3"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
_err "$MAILGUN_REGION is not a valid region."
|
||||||
|
return 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
MAILGUN_TO="${MAILGUN_TO:-$(_readaccountconf_mutable MAILGUN_TO)}"
|
MAILGUN_TO="${MAILGUN_TO:-$(_readaccountconf_mutable MAILGUN_TO)}"
|
||||||
if [ -z "$MAILGUN_TO" ]; then
|
if [ -z "$MAILGUN_TO" ]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user