From 6c8561249943cb11ec89cd574f1cbcef9ecb0c8a Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Fri, 24 Oct 2008 06:15:54 +0000 Subject: [1.0.X] Backed out r9250. I committed this to the branch by mistake; there's no bug in functionality fixed by this. Refs #9383. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9253 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/core/mail.py | 8 -------- 1 file changed, 8 deletions(-) (limited to 'django/core/mail.py') diff --git a/django/core/mail.py b/django/core/mail.py index 9ccf7a4d84..58588bf712 100644 --- a/django/core/mail.py +++ b/django/core/mail.py @@ -268,10 +268,6 @@ class EmailMessage(object): def send(self, fail_silently=False): """Sends the email message.""" - if not self.recipients(): - # Don't bother creating the network connection if there's nobody to - # send to. - return 0 return self.get_connection(fail_silently).send_messages([self]) def attach(self, filename=None, content=None, mimetype=None): @@ -370,16 +366,12 @@ def send_mass_mail(datatuple, fail_silently=False, auth_user=None, def mail_admins(subject, message, fail_silently=False): """Sends a message to the admins, as defined by the ADMINS setting.""" - if not settings.ADMINS: - return EmailMessage(settings.EMAIL_SUBJECT_PREFIX + subject, message, settings.SERVER_EMAIL, [a[1] for a in settings.ADMINS] ).send(fail_silently=fail_silently) def mail_managers(subject, message, fail_silently=False): """Sends a message to the managers, as defined by the MANAGERS setting.""" - if not settings.MANAGERS: - return EmailMessage(settings.EMAIL_SUBJECT_PREFIX + subject, message, settings.SERVER_EMAIL, [a[1] for a in settings.MANAGERS] ).send(fail_silently=fail_silently) -- cgit v1.3