Opened 7 years ago

Closed 7 years ago

#5915 closed (wontfix)

use_tls is not passed to send_email (django.core.mail)

Reported by: anonymous Owned by: nobody
Component: Core (Other) Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

As for revision 6660 you cannot pass use_tls to send_email function.
Patch is simple:

max@explorer ~/devel/django-inst/trunk/django/core $ svn diff mail.py                                                                                                                                                 
Index: mail.py
===================================================================
--- mail.py     (revision 6660)
+++ mail.py     (working copy)
@@ -326,7 +326,7 @@
     New code should use the EmailMessage class directly.
     """
     connection = SMTPConnection(username=auth_user, password=auth_password,
-                                 fail_silently=fail_silently)
+                                 fail_silently=fail_silently, use_tls=None)
     return EmailMessage(subject, message, from_email, recipient_list, connection=connection).send()
 
 def send_mass_mail(datatuple, fail_silently=False, auth_user=None, auth_password=None):

Change History (2)

comment:1 Changed 7 years ago by anonymous

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Summary changed from use_tls is not passed from send_email (django.core.mail) to use_tls is not passed to send_email (django.core.mail)

comment:2 Changed 7 years ago by ubernostrum

  • Resolution set to wontfix
  • Status changed from new to closed

Closing wontfix for the following reasons:

  1. send_mail() exists as a backwards-compatible wrappper around EmailMessage and SMTPConnection.
  2. send_mail() is not intended to provide every conceivable feature of the classes it wraps.
  3. We have in the past chosen not to add additional features to send_mail(), preferring instead to direct people toward using EmailMessage and SMTPConnection directly.
Note: See TracTickets for help on using tickets.
Back to Top