Skip to main content

SendGrid Backend for Django

Project description

Simple django backend to send email using SendGrid’s Web API.


Install the backend from PyPI:

pip install sendgrid-django

Add the following to your project’s

EMAIL_BACKEND = "sgbackend.SendGridBackend"
SENDGRID_USER = "Your SendGrid Username"
SENDGRID_PASSWORD = "Your SendGrid Password"



from django.core.mail import send_mail
from django.core.mail import EmailMultiAlternatives

send_mail("Your Subject", "This is a simple text email body.",
  "Yamil Asusta <>", [""])

# or
mail = EmailMultiAlternatives(
  subject="Your Subject",
  body="This is a simple text email body.",
  from_email="Yamil Asusta <>",
  headers={"Reply-To": ""}
mail.attach_alternative("<p>This is a simple HTML email body</p>", "text/html")



Enjoy :)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for sendgrid-django, version 1.0.1
Filename, size File type Python version Upload date Hashes
Filename, size sendgrid-django-1.0.1.macosx-10.9-intel.exe (66.3 kB) File type Windows Installer Python version any Upload date Hashes View hashes
Filename, size sendgrid-django-1.0.1.tar.gz (3.2 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page