From ea881189f7e5d504a018cd7112759b897221c0c8 Mon Sep 17 00:00:00 2001 From: neilpang Date: Mon, 29 Apr 2019 20:52:36 +0800 Subject: [PATCH] fix format --- notify/mail.sh | 6 +++--- notify/mailgun.sh | 6 +----- notify/pop.sh | 6 +++--- notify/sendgrid.sh | 2 -- notify/smtp.sh | 6 +++--- 5 files changed, 10 insertions(+), 16 deletions(-) diff --git a/notify/mail.sh b/notify/mail.sh index 47e20414..3dfef0be 100644 --- a/notify/mail.sh +++ b/notify/mail.sh @@ -2,14 +2,14 @@ # support local mail app - - mail_send() { _subject="$1" _content="$2" _statusCode="$3" #0: success, 1: error 2($RENEW_SKIP): skipped + _debug "_subject" "$_subject" + _debug "_content" "$_content" + _debug "_statusCode" "$_statusCode" _err "Not implemented yet." return 1 } - diff --git a/notify/mailgun.sh b/notify/mailgun.sh index 487e338e..c1085a74 100644 --- a/notify/mailgun.sh +++ b/notify/mailgun.sh @@ -7,10 +7,8 @@ #MAILGUN_REGION="us|eu" #optional, use "us" as default #MAILGUN_API_DOMAIN="xxxxxx.com" #optional, use the default sandbox domain - #MAILGUN_FROM="xxx@xxxxx.com" #optional, use the default sendbox account - _MAILGUN_BASE="https://api.mailgun.net/v3" # subject content statusCode @@ -53,7 +51,7 @@ mailgun_send() { _err "Can not get sandbox domain." return 1 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" MAILGUN_API_DOMAIN="$_sendboxDomain" if [ -z "$MAILGUN_API_DOMAIN" ]; then @@ -122,5 +120,3 @@ _mailgun_rest() { return 0 } - - diff --git a/notify/pop.sh b/notify/pop.sh index a499406a..f118d79b 100644 --- a/notify/pop.sh +++ b/notify/pop.sh @@ -2,14 +2,14 @@ # support pop - - pop_send() { _subject="$1" _content="$2" _statusCode="$3" #0: success, 1: error 2($RENEW_SKIP): skipped + _debug "_subject" "$_subject" + _debug "_content" "$_content" + _debug "_statusCode" "$_statusCode" _err "Not implemented yet." return 1 } - diff --git a/notify/sendgrid.sh b/notify/sendgrid.sh index d8e0e7e7..bd04155a 100644 --- a/notify/sendgrid.sh +++ b/notify/sendgrid.sh @@ -1,13 +1,11 @@ #!/usr/bin/env sh - #Support SENDGRID.com api #SENDGRID_API_KEY="" #SENDGRID_TO="xxxx@xxx.com" #SENDGRID_FROM="xxxx@cccc.com" - sendgrid_send() { _subject="$1" _content="$2" diff --git a/notify/smtp.sh b/notify/smtp.sh index 2b9d69f8..6aa37ca3 100644 --- a/notify/smtp.sh +++ b/notify/smtp.sh @@ -2,14 +2,14 @@ # support smtp - - smtp_send() { _subject="$1" _content="$2" _statusCode="$3" #0: success, 1: error 2($RENEW_SKIP): skipped + _debug "_subject" "$_subject" + _debug "_content" "$_content" + _debug "_statusCode" "$_statusCode" _err "Not implemented yet." return 1 } -