This library allows you to quickly and easily use the SendGrid Web API via Python.
This library uses the Sendgrid v2 Web API.
Download and extract to your project folder.
Set your API KEY and Sender Details (If sender is constant) in credentials.py file inside the sendgrid folder.
SENDGRID_API_KEY = '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'
FROM_NAME = 'Sender'
FROM_EMAIL = '[email protected]'
from sendgrid import *
send_via_sendgrid(
receiver=[{'email': '[email protected]', 'name': 'John Doe'}],
subject='This is a Subject',
html='Html Body',
plain_text='Text Body',
from_name='Dave Doe',
sender_email='[email protected]',
reply_to='[email protected]'):