Table of Contents
This repository serves as a microservice built to send a notification email to a student after an instructor leaves feedback for a project.
- Clone this repo
- Install dependencies:
pip3 install -r requirements.txt
- Local development needs an API key
https://sendgrid.com/docs/api-reference/
- Update your environment with your API key
$echo "export SENDGRID_API_KEY='YOUR_API_KEY'" > sendgrid.env
$echo "sendgrid.env" >> .gitignore
$source ./sendgrid.env
- Start flask server
#local development server
$python3 run.py
#production server
$ gunicorn run:app
- Python 3.9.5
ReST Endpoints
PUT /api/v1/email
- Sends Email to the recipient with the corresponding subject and content. Required parameters to be sent in body request as JSON.
Required Body:
{
"to": "[email protected]",
"subject": "Test",
"content": "This is a test"
}