Skip to main content

django-sendgrid

django-sendgrid is the easiest way to send e-mail with SendGrid. It uses the SendGrid SMTP API, as recommended.

Although it’s rather simple to use, a example project is included to demonstrate usage.

Installation

To install with PyPi:

pip install django-sendgrid

Usage

Add sendgrid to your INSTALLED_APPS:

INSTALLED_APPS = (
        # Existing apps
        "sendgrid",
)

Add the following to your settings:

SENDGRID_EMAIL_HOST = "smtp.sendgrid.net"
SENDGRID_EMAIL_PORT = 587
SENDGRID_EMAIL_USERNAME = "your_sendgrid_username"
SENDGRID_EMAIL_PASSWORD = "your_sendgrid_password"

The API is similar to that of Django’s; create a SendGridEmailMessage and send it:

>>> from sendgrid.message import SendGridEmailMessage
>>> email = SendGridEmailMessage('Subject', 'Body', 'ryan@ryanbalfanz.net', ['ryan@ryanbalfanz.net'])
>>> email.send()

Additional Information

Release files for django-sendgrid 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-sendgrid 1.0.0
File Size Uploaded
django-sendgrid-1.0.0.tar.gz 21.4 kB Details

Release files / django-sendgrid-1.0.0.tar.gz

Download URL django-sendgrid-1.0.0.tar.gz
Size 21.4 kB
Tags Source
SHA-256 checksum
How to use checksums
2dc270bb8c0786442257e301327e7a54b7c1c2997b1d7a812a6955ab2c3ae901
BLAKE2b-256 checksum
How to use checksums
15e58880b6573b97ce06409bca19713d016e4806ed7f72eecc9ee873a9f7592f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

1.0.1

1 release file

This release

1.0.0 This release

1 release file

0.5.2

1 release file

0.5.1

1 release file

0.5.0

1 release file

0.4.4

1 release file

0.4.3

1 release file

0.4.2

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.0

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page