﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
26496	AdminEmailHandler can produce mails violating RFC2822	Michal Čihař	Pyie Zone	"The RFC2822 specifies maximal length of line in a message to 998 characters (see also https://code.djangoproject.com/ticket/22561). However with AdminEmailHandler it's quite easy to reach it once settings contains some more complex dictionary, which is always printed on single line.

The problematic template is TECHNICAL_500_TEXT_TEMPLATE in django/views/debug.py:

https://github.com/django/django/blob/master/django/views/debug.py#L1121

Specially this code:

{{{
Using settings module {{ settings.SETTINGS_MODULE }}{% for k, v in settings.items|dictsort:0 %}
{{ k }} = {{ v|stringformat:""r"" }}{% endfor %}
}}}


I think best approach would be to use pformat for formatting those entries same as is used for request parameters."	Bug	closed	Error reporting	1.9	Normal	fixed			Accepted	0	0	0	0	1	0
