Skip to content

Preserve literal email text when templating is not requested - #541

Merged
selwin merged 2 commits into
ui:masterfrom
amanjain:fix/literal-email-text
Oct 17, 2026
Merged

selwin merged 2 commits into
ui:masterfrom
amanjain:fix/literal-email-text

Conversation

@amanjain

Copy link
Copy Markdown
Contributor

Send subject, plain text and HTML literally when no template or context is supplied. Preserve template rendering when context is explicitly provided, including an empty dictionary.

Includes regression tests and a changelog entry.

Fixes #478. Split from #539 as requested.

Validation: full test suites passed on Django 4.2.30 and 6.1.2; formatting checks passed.

@selwin ready for review.
@JestemStefan @nortigo @jamespanic could you verify this against your reported case?

Render subject, plain text and HTML only when a template or explicit
context is supplied. Preserve literal template-like text in ordinary
emails, while retaining rendering for an explicit empty context.

Add direct creation and Django email-backend regression coverage.
Fixes ui#478.

Validation: full suites on Django 4.2.30 and 6.1.2; formatting check.
@selwin

selwin commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator

@amanjain can you fix the conflict? You can also ignore the changelog when opening a PR, I'll fill out the changelog and give credits before I make a release.

@amanjain

Copy link
Copy Markdown
Contributor Author

@selwin I’ve merged the latest master and resolved the conflict, leaving the changelog unchanged from master as requested.

@selwin
selwin merged commit 3e7bffa into ui:master Oct 17, 2026
23 checks passed
@selwin

selwin commented Oct 17, 2026

Copy link
Copy Markdown
Collaborator

Thanks!

@amanjain
amanjain deleted the fix/literal-email-text branch October 18, 2026 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"TemplateSyntaxError: Could not parse the remainder" when sending email with triple curly braces

2 participants