Updated notify (markdown)
parent
d0879aeebb
commit
3c324970ca
33
notify.md
33
notify.md
|
@ -1,6 +1,14 @@
|
|||
# Set notification
|
||||
|
||||
acme.sh can send notifications in its cronjob.
|
||||
The notifications can be emails for another supported way, such as request to a webhook etc.
|
||||
|
||||
As for now, there is email notification supported, but there will be more soon. You can also implement your hook.
|
||||
|
||||
See example: `mailgun.sh` or `sendgrid.sh`
|
||||
|
||||
|
||||
## Usage:
|
||||
```sh
|
||||
acme.sh --set-notify [--notify-hook mailgun]
|
||||
|
||||
|
@ -30,16 +38,33 @@ acme.sh --set-notify [--notify-mode 0]
|
|||
|
||||
## 1. Set notification for mailgun.com
|
||||
|
||||
Send notification by mailgun.com api. The notification email will be sent to your email address.
|
||||
|
||||
Please register a free account at mailgun.com, you will get your api key.
|
||||
|
||||
If you don't have a domain, you can use the sandbox domain in your account.
|
||||
It looks like `sandbox888888.mailgun.org`.
|
||||
If you use the sandbox domain, you must add your receiving email address as an "Authorized recipient"
|
||||
https://app.mailgun.com/app/account/authorized
|
||||
|
||||
|
||||
```sh
|
||||
#The api key in your account.
|
||||
export MAILGUN_API_KEY="xxxxxxxx"
|
||||
export MAILGUN_API_DOMAIN="xxxxxx.com"
|
||||
export MAILGUN_FROM="xxx@xxxxx.com"
|
||||
|
||||
#The api domain, you can use the sandbox domain in your account.
|
||||
export MAILGUN_API_DOMAIN="xxxxxx.com"
|
||||
|
||||
#Optional, the mail from address. it must be user@MAILGUN_API_DOMAIN
|
||||
export MAILGUN_FROM="xxx@xxxxxx.com"
|
||||
|
||||
#The mail to address, which is to receive the notification.
|
||||
export MAILGUN_TO="yyyy@gmail.com"
|
||||
|
||||
|
||||
#Optional, if your mailgun account is in eu region, you must set MAILGUN_REGION
|
||||
export MAILGUN_REGION="us|eu" #optional, use "us" as default
|
||||
|
||||
acme.sh --set-notify --notify-hook mailgun
|
||||
acme.sh --set-notify --notify-hook mailgun
|
||||
```
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue