This module helps build SendGrid's SMTP API headers.
Learn more about the SMTP API at SendGrid documentation.
All the updates to this module are documented in our CHANGELOG.
- Python version 2.7 or 3.4+
- The SendGrid service, starting at the free level
pip install smtpapi
Update the development environment with your SENDGRID_API_KEY, for example:
cp .env_sample .env
In .env
set SENDGRID_API_KEY
to your own API key.
You can add your environment variables to your environment by sourcing the file:
source .env
from smtpapi import SMTPAPIHeader
header = SMTPAPIHeader()
header.add_to('email@email.com')
print(header.json_string())
We encourage contribution to our projects, please see our CONTRIBUTING guide for more details.
Quick links:
The simplest local development workflow is by using Docker.
Steps:
- Install [Docker](https://www.docker.com/)
- Run
docker-compose build
(this builds the container) - Run
docker-compose up
(this runs tests by default)
smtpapi-python is maintained and funded by Twilio SendGrid, Inc. The names and logos for smtpapi-python are trademarks of Twilio SendGrid, Inc.