mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #9214: EmailMessage now respects the From header instead of blindly using from_email. Thanks, Tai Lee.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9842 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -88,4 +88,11 @@ BadHeaderError: Header values can't contain newlines (got u'Subject\nInjection T
|
||||
>>> settings.ADMINS = old_admins
|
||||
>>> settings.MANAGERS = old_managers
|
||||
|
||||
# Make sure we can manually set the From header (#9214)
|
||||
|
||||
>>> email = EmailMessage('Subject', 'Content', 'bounce@example.com', ['to@example.com'], headers={'From': 'from@example.com'})
|
||||
>>> message = email.message()
|
||||
>>> message['From']
|
||||
'from@example.com'
|
||||
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user