﻿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
30604	Raise exceptions in mail_admins()/mail_managers() when settings are not in expected formats.	Kevin Blicharski	Hasan Ramezani	"Hi,

First time writing a ticket so I apologize if I do anything improperly here. This issue just arose on a project I've been working on, and it goes as follows:

Our MANAGERS setting was set like so:

{{{
MANAGERS = ['one@example.com', 'two@example.com']
}}}

And after calling mail_managers, the result was:
{{{
smtplib.SMTPRecipientsRefused: {'=?utf-8?q?h?=': (550, b'5.1.1 <=?utf-8?q?h?=>: Recipient address rejected: User unknown in local recipient table'), '=?utf-8?q?u?=': (550, b'5.1.1 <=?utf-8?q?u?=>: Recipient address rejected: User unknown in local recipient table')}
}}}

After some investigation it became clear that this setting was in the improper format, but that was only because of [https://stackoverflow.com/questions/13481307/django-admin-emails-are-not-sending-properly this StackOverflow post]. It would be nice if Django failed early if this setting was detected but improperly set, rather than waiting until the consequences become apparent.

Thank you,
Kevin
"	Cleanup/optimization	closed	Core (Mail)	dev	Normal	fixed			Accepted	1	0	0	0	1	0
