#23944: Django should use custom exceptions for errors thrown by send_mail 
(etc.),
not smtplib.SMTPException
------------------------------+--------------------
     Reporter:  jordanreiter  |      Owner:  nobody
         Type:  New feature   |     Status:  new
    Component:  Core (Mail)   |    Version:  1.7
     Severity:  Normal        |   Keywords:
 Triage Stage:  Unreviewed    |  Has patch:  0
Easy pickings:  0             |      UI/UX:  0
------------------------------+--------------------
 Since Django allows all kinds of backends — not just SMPT — for sending
 mail, it should have its own exceptions that different mail backends can
 subclass.

 Otherwise, if you have code like this:

 {{{
 try:
     send_mail(...)
 except smptlib.SMTPException:
     # do something
 }}}

 And then switch to a backend that doesn't use smtplib, you won't catch the
 error.

 I think the exceptions should be available from
 `django.core.mail.exceptions` and then subclassed within each backend.

--
Ticket URL: <https://code.djangoproject.com/ticket/23944>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/055.f5dbbb294ee74346b566b5b8d8628f84%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to