fix format

This commit is contained in:
neilpang 2019-04-29 20:52:36 +08:00
parent 4861ad1ac9
commit ea881189f7
5 changed files with 10 additions and 16 deletions

View File

@ -2,14 +2,14 @@
# support local mail app # support local mail app
mail_send() { mail_send() {
_subject="$1" _subject="$1"
_content="$2" _content="$2"
_statusCode="$3" #0: success, 1: error 2($RENEW_SKIP): skipped _statusCode="$3" #0: success, 1: error 2($RENEW_SKIP): skipped
_debug "_subject" "$_subject"
_debug "_content" "$_content"
_debug "_statusCode" "$_statusCode"
_err "Not implemented yet." _err "Not implemented yet."
return 1 return 1
} }

View File

@ -7,10 +7,8 @@
#MAILGUN_REGION="us|eu" #optional, use "us" as default #MAILGUN_REGION="us|eu" #optional, use "us" as default
#MAILGUN_API_DOMAIN="xxxxxx.com" #optional, use the default sandbox domain #MAILGUN_API_DOMAIN="xxxxxx.com" #optional, use the default sandbox domain
#MAILGUN_FROM="xxx@xxxxx.com" #optional, use the default sendbox account #MAILGUN_FROM="xxx@xxxxx.com" #optional, use the default sendbox account
_MAILGUN_BASE="https://api.mailgun.net/v3" _MAILGUN_BASE="https://api.mailgun.net/v3"
# subject content statusCode # subject content statusCode
@ -53,7 +51,7 @@ mailgun_send() {
_err "Can not get sandbox domain." _err "Can not get sandbox domain."
return 1 return 1
fi fi
_sendboxDomain="$(echo "$response" | _egrep_o '"name": *"sandbox.*.mailgun.org"' | cut -d : -f 2 | tr -d '" ')"; _sendboxDomain="$(echo "$response" | _egrep_o '"name": *"sandbox.*.mailgun.org"' | cut -d : -f 2 | tr -d '" ')"
_debug _sendboxDomain "$_sendboxDomain" _debug _sendboxDomain "$_sendboxDomain"
MAILGUN_API_DOMAIN="$_sendboxDomain" MAILGUN_API_DOMAIN="$_sendboxDomain"
if [ -z "$MAILGUN_API_DOMAIN" ]; then if [ -z "$MAILGUN_API_DOMAIN" ]; then
@ -122,5 +120,3 @@ _mailgun_rest() {
return 0 return 0
} }

View File

@ -2,14 +2,14 @@
# support pop # support pop
pop_send() { pop_send() {
_subject="$1" _subject="$1"
_content="$2" _content="$2"
_statusCode="$3" #0: success, 1: error 2($RENEW_SKIP): skipped _statusCode="$3" #0: success, 1: error 2($RENEW_SKIP): skipped
_debug "_subject" "$_subject"
_debug "_content" "$_content"
_debug "_statusCode" "$_statusCode"
_err "Not implemented yet." _err "Not implemented yet."
return 1 return 1
} }

View File

@ -1,13 +1,11 @@
#!/usr/bin/env sh #!/usr/bin/env sh
#Support SENDGRID.com api #Support SENDGRID.com api
#SENDGRID_API_KEY="" #SENDGRID_API_KEY=""
#SENDGRID_TO="xxxx@xxx.com" #SENDGRID_TO="xxxx@xxx.com"
#SENDGRID_FROM="xxxx@cccc.com" #SENDGRID_FROM="xxxx@cccc.com"
sendgrid_send() { sendgrid_send() {
_subject="$1" _subject="$1"
_content="$2" _content="$2"

View File

@ -2,14 +2,14 @@
# support smtp # support smtp
smtp_send() { smtp_send() {
_subject="$1" _subject="$1"
_content="$2" _content="$2"
_statusCode="$3" #0: success, 1: error 2($RENEW_SKIP): skipped _statusCode="$3" #0: success, 1: error 2($RENEW_SKIP): skipped
_debug "_subject" "$_subject"
_debug "_content" "$_content"
_debug "_statusCode" "$_statusCode"
_err "Not implemented yet." _err "Not implemented yet."
return 1 return 1
} }