Registry / communication / django-templated-email

django-templated-email

JSON →
library3.1.1pypypi✓ verified 81d ago

A Django-oriented templated/transactional email abstraction library that supports multiple backends (e.g., Mandrill, SendGrid, SES) and allows you to send emails using Django templates. Current version 3.1.1 supports Django 4.2, 5.0, 5.1 and Python 3.10-3.13. Release cadence is sporadic.

pip install django-templated-email
INSTALL
IMPORT
SIG · DJANGO-TEMPLATED-E
D
django-templated-email
communicationpythonv3.1.1
Install
3.5s avg
Import
Disk
66MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v3.1.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 66.5MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.5s · import 0.000s · 67MB
66MB installed
● package 66MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

send_templated_mail
from templated_email import send_templated_mail
from templated_email import send_templated_email
get_templated_mail
from templated_email import get_templated_mail
TemplateBackend
from templated_email import TemplateBackend

Sends an email using a Django template named 'welcome'. Requires Django settings for email backend (e.g., SMTP).

import os from templated_email import send_templated_email send_templated_email( template_name='welcome', from_email='from@example.com', recipient_list=['to@example.com'], context={'username': 'John', 'site_url': 'http://example.com'}, # For authentication, set EMAIL_HOST_USER and EMAIL_HOST_PASSWORD in Django settings. )
Debug
Known issues
breakingIn version 3.0.0, HTML parts in templates are now escaped by default. If you relied on unescaped HTML, you need to use the 'autoescape' block.
fix
Wrap your HTML content in {% autoescape off %}...{% endautoescape %} if you need raw HTML.
affects: >=3.0.0
deprecatedPython 3.6, 3.7, 3.8 and Django 2.2, 3.1, 3.2 are no longer supported as of version 3.1.0.
fix
Upgrade to Python >=3.10 and Django >=4.2.
affects: <3.1.0
gotchaThe library expects template files to be in a 'templated_email/' directory under your templates. If templates are missing, it silently falls back to plain text without error.
fix
Ensure your email templates are located at: <app>/templates/templated_email/<template_name>.email (or .txt for plain text).
affects: all
gotchaCalling send_templated_email without an explicit 'from_email' parameter will raise an error if settings.DEFAULT_FROM_EMAIL is not set.
fix
Set DEFAULT_FROM_EMAIL in settings or always pass from_email.
affects: <3.1.1, also affects >=3.1.1 if DEFAULT_FROM_EMAIL not set
Upgrade
Version history
3.1.1latest on PyPI · released Aug 21, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
14 hits · last 30 days
node
12
OpenAI (training)
1
Resources
django-templated-email — pip install django-templated-email · libregistry