#31784: Emails name over 75 characters are incompatible with the latest 
versions of
python.
-----------------------------+--------------------------------------
     Reporter:  Nick Orr     |                    Owner:  nobody
         Type:  Bug          |                   Status:  closed
    Component:  Core (Mail)  |                  Version:  2.2
     Severity:  Normal       |               Resolution:  invalid
     Keywords:               |             Triage Stage:  Unreviewed
    Has patch:  0            |      Needs documentation:  0
  Needs tests:  0            |  Patch needs improvement:  0
Easy pickings:  0            |                    UI/UX:  0
-----------------------------+--------------------------------------

Comment (by Nick Orr):

 RFC 2822:

 > Each line of characters MUST be no more than 998 characters, and SHOULD
 be no more than 78 characters

 Instead of Django being ok with feeding an underlying Python library data
 that will cause an exception as with all things Python it seems like
 Django would be better off getting out of the way and letting the users
 shoot themselves in the foot.

 I'd suggest that this call:

 nm = Header(nm, encoding).encode()

 Include the actual RFC line length limit of 998 in either the class
 instantiation or the encode method as either of those accept maxlinelen as
 a kwarg.

 Or as a non-changing compromise it could be hived off into setting with
 the default being 75 as it stands now. That would allow developers to
 overwrite the setting if needed. Though it would also add yet another
 setting for people to know about.

 Either way the current implementation is likely to cause a great deal of
 pain as developers find out that an email addressed to: "Django with a
 really long name for reasons that make sense in the context of a project
 <[email protected]>" are inexplicably crashing in core Python code
 they've never seen before.

 Most of us would rather send a wonky, if technically correct, email versus
 just having that email vanish into the ether.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/31784#comment:3>
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.6d52eba54b4b5ebaa942c51be70fd9cf%40djangoproject.com.

Reply via email to