Simple wrapper to use SendGrid SMTP API
Low maintenance activity. Last release over 4 years ago, commits in 0 of the last 26 weeks. Weaker on commit activity and recent releases.
pip install smtpapi.. image:: https://uiux.s3.amazonaws.com/2016-logos/email-logo%402x.png :target: https://www.sendgrid.com :alt: SendGrid Logo
|Test and Deploy Badge| |Twitter Follow| |Codecov branch| |Python Versions| |PyPI Version| |GitHub contributors| |MIT Licensed|
This module helps build SendGrid's SMTP API headers.
Learn more about the SMTP API at SendGrid documentation_.
Announcements
The default branch name for this repository has been changed to main as of 07/27/2020.
All the updates to this module are documented in our CHANGELOG_.
Table of Contents
Installation <#installation>__Quick Start <#quick-start>__Usage <#usage>__How to Contribute <#how-to-contribute>__Local Setup of the Project <#local-setup-of-the-project>__About <#about>__License <#license>__
Installation
Prerequisites
- Python version 2.7 or 3.4+
- The SendGrid service, starting at the
free level_
Install Package
.. code:: bash
pip install smtpapi
Setup Environment Variables
Update the development environment with your SENDGRID_API_KEY_, for example:
.. code:: bash
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:
.. code:: bash
source .env
Quick Start
.. code:: python
from smtpapi import SMTPAPIHeader
header = SMTPAPIHeader()
header.add_to('email@email.com')
print(header.json_string())
Usage
SendGrid documentation_Example Code_
How to Contribute
We encourage contribution to our projects, please see our _ guide for more details.