https://github.com/macrat/ayd-mailto-alert
Email alert sender for Ayd alive monitoring tool
https://github.com/macrat/ayd-mailto-alert
alerting ayd email
Last synced: 6 months ago
JSON representation
Email alert sender for Ayd alive monitoring tool
- Host: GitHub
- URL: https://github.com/macrat/ayd-mailto-alert
- Owner: macrat
- License: mit
- Created: 2021-04-17T11:14:04.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2025-02-09T09:54:33.000Z (over 1 year ago)
- Last Synced: 2025-02-09T10:26:10.357Z (over 1 year ago)
- Topics: alerting, ayd, email
- Language: Go
- Homepage:
- Size: 47.9 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
ayd-mailto-alert
================
SMTP email alert sender for [Ayd](https://github.com/macrat/ayd) alive monitoring tool.
## Install
1. Download binary from [release page](https://github.com/macrat/ayd-mailto-alert/releases).
2. Save downloaded binary as `ayd-mailto-alert` to somewhere directory that registered to PATH.
## Usage
### Use mailrc
``` shell
$ cat ~/.mailrc
set smtp=smtps://smtp.gmail.com
set smtp-auth-user="your username"
set smtp-auth-password="your password"
set from="your name "
$ export AYD_URL="http://ayd-external-url.example.com"
$ ayd -a mailto:your-email@example.com ping:your-target.example.com
```
### Use environment variable
``` shell
$ export SMTP_SERVER=smtp.gmail.com:465
$ export SMTP_USERNAME=$YOUR_USERNAME
$ export SMTP_PASSWORD=$YOUR_PASSWORD
$ export AYD_URL="http://ayd-external-url.example.com"
$ ayd -a mailto:your-email@example.com ping:your-target.example.com
```
## Options
Set all options through environment variable.
| Variable | Default | Description |
|-----------------|-----------------------------|------------------------------------|
| `SMTP_SERVER` | | SMTP server name and port. |
| `SMTP_USERNAME` | | User name for SMTP server. |
| `SMTP_PASSWORD` | | Password for SMTP server. |
| `AYD_URL` | | Ayd server address. (optional) |
| `AYD_MAIL_FROM` | `Ayd Alert ` | The From email address. (optional) |
`AYD_MAIL_FROM` can also be set by `from` query in URL, for example, `mailto:your-email@example.com?from=your-server@example.com`.