resting-mailer/README.md

29 lines
586 B
Markdown
Raw Permalink Normal View History

2023-01-23 22:29:36 -05:00
# restful mailer
a simple and hacky rest api for sending emails
# running (bare metal)
```sh
pip install -r requirements.txt
python -m flask run --host=0.0.0.0
```
# running (docker)
```sh
docker build . -t resting-mailer
docker run -p 5000:5000 resting-mailer
```
# sending emails
assuming run on localhost
``` sh
curl --header "Content-Type: application/json" \
http://localhost:5000/send \
-d \
'{"host": "<host>", "username": "<username>", "password": "<password", "to": "<someone>", "from": "<me>", "subject": "testicle", "content": "balls to the wall"}'
```