Hello, After sereral minutes while using new Django (1.7) in DEBUG mode, I've got enigmatic error on the screen: "A server error occurred. Please contact the administrator." This message is shown when another exception is raised within django.core.handlers.base.handle_uncaught_exception. What exception was raised inside uncaught exception handler? socket.error. Why? Django tried to send me an email using nonexistent smtp (localhost:25, the default).
AdminEmailHandler is sending emails with fail_silently set to True, but the django.core.mail.smtp backend does not respect this setting as expected. Any connection problem will generate "A server error occured[...]" screen instead of traceback or error 500 page. This issue was created by resolving https://code.djangoproject.com/ticket/21189 "Fail silently" mode with SMTP backend is not 100% silent anymore. I saw that docs were changed, but the behaviour is inconsistent now. As a developer I'm expecting to silence ANY email error, including connection errors (not only SMTP errors). As an application developer I have no idea which email backend will be used, so I can't wrap every "mail.send()" with additional try-except block catching all possible exceptions. When I need to silent sending email fail, the email backend should do it for me (as before v1.7). Line https://github.com/django/django/blob/stable/1.7.x/django/core/mail/backends/smtp.py#L61 should catch socket.error too, or should be reverted to previous state. Kind Regards, Marcin -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at http://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/88a73d00-68d0-4406-8cee-c8a7d87f3d9b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.