https://github.com/proofrock/mailrg
A HTTP endpoint to send emails
https://github.com/proofrock/mailrg
Last synced: 8 months ago
JSON representation
A HTTP endpoint to send emails
- Host: GitHub
- URL: https://github.com/proofrock/mailrg
- Owner: proofrock
- License: gpl-3.0
- Created: 2024-04-06T20:07:32.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-06T20:20:45.000Z (about 2 years ago)
- Last Synced: 2024-12-26T14:45:04.164Z (over 1 year ago)
- Language: Go
- Size: 16.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MailRG
This app implements a server that opens a POST endpoint that, when invoked with a JSON that describes an email message, sends the message.
The endpoint is `serve/`, and the JSON is:
```bash
{
"token": "CorrectHorseBatteryStaple",
"from": "john.doe@gmail.com",
"to": ["me@johndoe.it"],
"cc": ["you@johndoe.it"],
"bcc": ["secret@johndoe.it"],
"subject": "Hey!",
"body": "Fun! Cool!",
"html": true,
"attachments": ["file1.txt", "file2.pdf"]
}
```
Note that the attachments are relative to the `DATA_DIR` specified, and `cc`, `bcc`, `to` and `attachments` nodes can be omitted.
It can be installed via Docker:
```bash
docker run -p 2163:2163 -v $(pwd):/data \
-e SMTP_SERVER=smtp.gmail.com \
-e SMTP_USER="john.doe@gmail.com" \
-e SMTP_PASS="xyz" \
-e MAILRG_TOKEN="CorrectHorseBatteryStaple" \
germanorizzo/mailrg:latest
```