diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-10-24 06:15:54 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-10-24 06:15:54 +0000 |
| commit | 6c8561249943cb11ec89cd574f1cbcef9ecb0c8a (patch) | |
| tree | a7a9a9c5abc7e1992ec709cdf2c10fb27dce38dd /django | |
| parent | b52e45193f25e8444d3d5eef4f83d0ee8f7a80b0 (diff) | |
[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
Diffstat (limited to 'django')
| -rw-r--r-- | django/core/mail.py | 8 |
1 files changed, 0 insertions, 8 deletions
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) |
