simple rest api for sending emails
Go to file
Nathan Dwarshuis e15a754b5f initial commit 2023-01-23 22:29:36 -05:00
Dockerfile initial commit 2023-01-23 22:29:36 -05:00
README.md initial commit 2023-01-23 22:29:36 -05:00
app.py initial commit 2023-01-23 22:29:36 -05:00
requirements.txt initial commit 2023-01-23 22:29:36 -05:00

README.md

restful mailer

a simple and hacky rest api for sending emails

running (bare metal)

pip install -r requirements.txt
python -m flask run --host=0.0.0.0

running (docker)

docker build . -t resting-mailer
docker run -p 5000:5000 resting-mailer

sending emails

assuming run on localhost

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"}'