1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Fixed #18861 -- Triggered message validation with locmem email backend

Thanks Bruno Renié for the report and the initial patch.
This commit is contained in:
Claude Paroz
2012-09-22 15:17:13 +02:00
parent 0ab8c58ca8
commit 8599f64e54
2 changed files with 7 additions and 0 deletions

View File

@@ -20,5 +20,7 @@ class EmailBackend(BaseEmailBackend):
def send_messages(self, messages):
"""Redirect messages to the dummy outbox"""
for message in messages: # .message() triggers header validation
message.message()
mail.outbox.extend(messages)
return len(messages)