- Create a sendgrid account
- Make sure you go through all the steps to set up a verified sender
- Create a restricted API key and enable the needed permissions
- Create an unsubscribe group
- Create a dynamic template
- Clone the repository
- Create a .env file with the following variables
SEND_GRID_API_KEY=<YOUR API KEY HERE>
FROM_EMAIL=<YOUR FROM EMAIL HERE>
TO_EMAIL=<YOUR TO EMAIL HERE>
UNSUBSCRIBE_GROUP_ID=<YOUR GROUP ID HERE>
DYNAMIC_TEMPLATE_ID=<YOUR DYNAMIC TEMPLATE ID HERE>
- Create a virtual environment with
venv
:python3 -m venv venv
- Activate the virtual environment:
source ./venv/bin/activate
- Install packages
pip install -r requirements.txt
- Run the desired example (e.g.
python examples-python/send-basic.py
)