#29837: Django refuses to send an email whose subject contains newlines
-----------------------------------------+------------------------
               Reporter:  Álex Córcoles  |          Owner:  nobody
                   Type:  New feature    |         Status:  new
              Component:  Core (Mail)    |        Version:  2.1
               Severity:  Normal         |       Keywords:
           Triage Stage:  Unreviewed     |      Has patch:  0
    Needs documentation:  0              |    Needs tests:  0
Patch needs improvement:  0              |  Easy pickings:  0
                  UI/UX:  0              |
-----------------------------------------+------------------------
 Hi,

 django.core.mail.send_mail raises an exception if the subject contains a
 newline.

 We have hit this problem because we have a piece of code that parses an
 email using Python's libraries, extracts the subject and then re-sends an
 email with the same subject.

 If this email has a multi-line subject (this seems to be common, I believe
 some bit in mail delivery code wordwraps headers), this code then fails
 unexpectedly.

 This is extremely hard to detect before it happens, so we would humbly
 suggest that send_mail don't raise an error if passed a subject containing
 a newline, but rather sends the email doing the necessary security
 handling.

 Kind regards,

 Álex

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29837>
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/050.c115325ec7ee93a59e7f91d856d9ad35%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to