mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-05-14 19:52:45 +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"
|
||||
|
||||
MAILGUN_REGION="${MAILGUN_REGION:-$(_readaccountconf_mutable MAILGUN_REGION)}"
|
||||
case "$MAILGUN_REGION" in
|
||||
[Uu][Ss] | "")
|
||||
if [ -z "$MAILGUN_REGION" ]; then
|
||||
MAILGUN_REGION=""
|
||||
_debug "The MAILGUN_REGION is not set, so use the default us region."
|
||||
_MAILGUN_BASE="https://api.mailgun.net/v3"
|
||||
else
|
||||
_saveaccountconf_mutable MAILGUN_REGION "$MAILGUN_REGION"
|
||||
_MAILGUN_BASE="https://api.eu.mailgun.net/v3"
|
||||
fi
|
||||
MAILGUN_REGION=""
|
||||
_MAILGUN_BASE="https://api.mailgun.net/v3"
|
||||
;;
|
||||
[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)}"
|
||||
if [ -z "$MAILGUN_TO" ]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user