https://github.com/dongri/sendhub
https://github.com/dongri/sendhub
amazon-ses mailgun rust sendgrid slack
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dongri/sendhub
- Owner: dongri
- License: mit
- Created: 2019-10-11T14:04:25.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-06-21T22:13:35.000Z (about 3 years ago)
- Last Synced: 2026-01-20T00:48:05.871Z (5 months ago)
- Topics: amazon-ses, mailgun, rust, sendgrid, slack
- Language: Rust
- Homepage:
- Size: 247 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Sendhub
sendhub provides api to send emails and slack webhook.

# Email Providers
* amazon ses
* mailgun
* sendgrid
# Change Email Primary Privider
```
curl -XPOST http://localhost:3000/api/email/settings \
-H 'Content-Type:application/json' \
-d '{"primary": "mailgun"}'
```
# Setting Load Balancing
```
curl -XPOST http://localhost:3000/api/email/settings \
-H 'Content-Type:application/json' \
-d '{"load_balancing": true}'
```
# Send Email And Slack Message
```
curl -XPOST http://localhost:3000/api/email/raw \
-H 'Content-Type:application/json' \
-d '{"from": "no-reply@hackerth.com", "to": "dongrify@gmail.com", "subject": "hello subject", "html": "
mail
"}'
```
```
curl -XPOST http://localhost:3000/api/email/template \
-H 'Content-Type:application/json' \
-d @- << EOF
{
"from": "no-reply@hackerth.com",
"to": "dongrify@gmail.com",
"subject": "hello subject",
"template": "hello",
"values": {
"message": "hello sendhub"
}
}
EOF
```
```
curl -XPOST http://localhost:3000/api/slack/message \
-H 'Content-Type:application/json' \
-d '{"channel": "monitor", "text": "system error"}'
```
# Edit template
`/templates/` Edit Email templates