﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
34904	Changing email object after sending mutates mail in mail.outbox	CheesyPhoenix	CheesyPhoenix	"When testing emails using the locmem email backend with mail.outbox, modifying an email object after calling `.send()` also modifies the email object in `django.core.mail.outbox`. This leads to inconsistencies between test and production environments, where an email modified in production after calling `.send()` will not be changed since it has already been sent.

Steps to reproduce:
- Run this test in any django project:
{{{#!python
def test_mutate_after_send(self) -> None:
    email = EmailMessage(
        subject=""correct subject"",
        body=""test body"",
        from_email=""from@example.com"",
        to=[""to@example.com""],
    )
    email.send()
    email.subject = ""incorrect subject""
    self.assertEqual(""correct subject"", mail.outbox[0].subject)
}}}

GitHub PR fixing the issue: https://github.com/django/django/pull/17377"	Bug	closed	Core (Mail)	dev	Normal	fixed	mail.outbox locmem testing		Ready for checkin	1	0	0	0	0	0
