FastAPI-Mail is a simple lightweight mail system, sending emails and attachments(individual && bulk).
This project shows how to send emails both asynchronously and using Background Tasks.
The email body parameters are provided as the request body. These parameters are then used by the HTML email template
The image below shows the request body(Right side) and the email received by the recepient (Left side)
- Python - version 3.7 and above
- Turn on less secure app google. Click here to follow a guide
FastAPI-Mail
├── app # contains app files
| ├── models.py
| └── send_mail.py
├── templates
| ├── email
| | └── email.html
| └── landing_page.html
├── .env
├── main.py # Application entry point
├── requirements.txt # project dependencies
└── README.md
git clone https://github.com/maxwellwachira/FastAPI-Mail.git
cd FastAPI-Mail/
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
create a file and name it as .env. Copy contents of .env.example to .env
Special thanks to sabuhish the author of fastapi-mail module.
Special thanks to Sebastián Ramírez aka @tiangolo the creator of FastAPI