#23063: send email 1.6.5 OK, 1.7c1 malformed packet in wireshark
-------------------------------------+-------------------------------------
Reporter: contact@… | Owner: nobody
Type: Bug | Status: new
Component: Core (Mail) | Version: 1.7
Severity: Normal | Resolution:
Keywords: send_mail, smtp, | Triage Stage:
malformed, packet | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by ainslied):
about the "fix" I have to try (comment:21) adding linesep='\r\n' to
flatten
The doc of
[https://docs.python.org/3.4/library/email.generator.html?highlight=flatten#email.generator.BytesGenerator.flatten
flatten] says :
{{{
Optional linesep specifies the line separator character used to terminate
lines in the output.
If specified it overrides the value specified by the Generatoror msg‘s
policy.
}}}
In the doc of
[https://docs.python.org/3.4/library/email.message.html#email.message.Message
email.message], I see the reference to the policy, and in the doc of
policy, I can read there is a specific (and new?) policy for SMTP
[https://docs.python.org/3.4/library/email.policy.html#email.policy.SMTP
email.policy.SMTP] including linesep set to \r\n
Using Python without Django, the msg looks well formated (so with the good
policy, or with a good policy hook?), but not with django. I can't really
figure out why..
--
Ticket URL: <https://code.djangoproject.com/ticket/23063#comment:28>
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/077.f9b2658682d05208f4f7371e998630e5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.