#26496: AdminEmailHandler can produce mails violating RFC2822
---------------------------------+-------------------------------------
     Reporter:  nijel            |                    Owner:  knightrix
         Type:  Bug              |                   Status:  closed
    Component:  Error reporting  |                  Version:  1.9
     Severity:  Normal           |               Resolution:  fixed
     Keywords:                   |             Triage Stage:  Accepted
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  1                |                    UI/UX:  0
---------------------------------+-------------------------------------
Changes (by knightrix):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 It looks like this is fixed by #22561. I modified the test like below and
 it passed for the use case.
 {{{#!python
    def test_send_long_lines(self):
         email = EmailMessage('Subject', "Commentçava},{'this': {'another':
 {'more': 'nested'}, 'inner': 'myinner'}, 'that': 'hi'}" * 100,
 '[email protected]', ['[email protected]'])
         email.send()
         message = self.get_the_message()
         message_content = message.get_payload()
         has_long_lines = any(len(l) > 998 for l in
 message_content.splitlines())
         self.assertFalse(has_long_lines)

 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26496#comment:8>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.b62fa0cb51612c994c14a2b5f9cbb936%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to