This is a small server that listens for POST requests on the /contact
endpoint. The server will send an email to the recipient specified in the env file.
- Clone the repository
- Create a virtuel environment.
- Install the dependencies with
pip install -r requirements.txt
env.json
file should be created with the following content:
{
"PW": "your_password",
"HOST": "the smtp hostname for your email provider",
"PORT": 587,
"FROM_EMAIL": "[email protected]",
"TO_EMAIL": ["[email protected]"]
}
- Run the server with
uvicorn main:app --host 0.0.0.0 --port 8080