﻿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
17811	Connection object is no passed to the EmailMessage constructor when called from send_mass_mail	Fedor Tyurin	Daniel Roseman	"There is a difference in the behavior of send_mail and send_mass_mail function. send_mail passes connection as a parameter to the EmailMessage constructor and send_mass_mail does not.
{{{
44	def send_mail(subject, message, from_email, recipient_list,
45	              fail_silently=False, auth_user=None, auth_password=None,
46	              connection=None):
...
57	    connection = connection or get_connection(username=auth_user,
58	                                    password=auth_password,
59	                                    fail_silently=fail_silently)
60	    return EmailMessage(subject, message, from_email, recipient_list,
61	                        connection=connection).send()
}}}

{{{
64	def send_mass_mail(datatuple, fail_silently=False, auth_user=None,
65	                   auth_password=None, connection=None):
...
78	    connection = connection or get_connection(username=auth_user,
79	                                    password=auth_password,
80	                                    fail_silently=fail_silently)
81	    messages = [EmailMessage(subject, message, sender, recipient)
82	                for subject, message, sender, recipient in datatuple]
83	    return connection.send_messages(messages)
}}}

This causes troubles if email backend stores something inside the self object for the later use and expects that messages would have reference to it."	Bug	closed	Core (Mail)	1.3	Normal	fixed	mail, connection, email	pmclanahan@…	Ready for checkin	1	0	0	0	1	0
