This module helps build SendGrid's SMTP API headers.
Learn more about the SMTP API at SendGrid's documentation.
All updates to this module is documented in our CHANGELOG.
- Python version 2.6, 2.7, 3.4 or 3.5
- 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())
If you are interested in the future direction of this project, please take a look at our milestones. We would love to hear your feedback.
We encourage contribution to our projects, please see our CONTRIBUTING guide for details.
Quick links:
The simplest local development workflow is by using docker.
Steps
- Install Docker
- Run
docker-compose build
(This builds the container) - Run
docker-compose up
(This runs tests by default)
smtpapi-python is guided and supported by the SendGrid Developer Experience Team.
smtpapi-python is maintained and funded by SendGrid, Inc. The names and logos for smtpapi-python are trademarks of SendGrid, Inc.