Я пытаюсь отправить почту из моего django приложения. Но следующий сервер 401 слишком занят. Я пробовал разные почтовые серверы, и все это привело к следующей трассировке. Как я могу решить эту ошибку. Спасибо.
Traceback (most recent call last):
api_1 | File "/usr/local/lib/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner
api_1 | response = get_response(request)
api_1 | File "/usr/local/lib/python3.7/site-packages/django/core/handlers/base.py", line 115, in _get_response
api_1 | response = self.process_exception_by_middleware(e, request)
api_1 | File "/usr/local/lib/python3.7/site-packages/django/core/handlers/base.py", line 113, in _get_response
api_1 | response = wrapped_callback(request, *callback_args, **callback_kwargs)
api_1 | File "/usr/local/lib/python3.7/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
api_1 | return view_func(*args, **kwargs)
api_1 | File "/usr/local/lib/python3.7/site-packages/django/views/generic/base.py", line 71, in view
api_1 | return self.dispatch(request, *args, **kwargs)
api_1 | File "/usr/local/lib/python3.7/site-packages/rest_framework/views.py", line 505, in dispatch
api_1 | response = self.handle_exception(exc)
api_1 | File "/usr/local/lib/python3.7/site-packages/rest_framework/views.py", line 465, in handle_exception
api_1 | self.raise_uncaught_exception(exc)
api_1 | File "/usr/local/lib/python3.7/site-packages/rest_framework/views.py", line 476, in raise_uncaught_exception
api_1 | raise exc
api_1 | File "/usr/local/lib/python3.7/site-packages/rest_framework/views.py", line 502, in dispatch
api_1 | response = handler(request, *args, **kwargs)
api_1 | File "/app/api/views/auth/forgot_password.py", line 37, in post
api_1 | reset_message = send_mail(subject, html_content, from_email, to, fail_silently=False, html_message=link_message)
api_1 | File "/usr/local/lib/python3.7/site-packages/django/core/mail/__init__.py", line 60, in send_mail
api_1 | return mail.send()
api_1 | File "/usr/local/lib/python3.7/site-packages/django/core/mail/message.py", line 276, in send
api_1 | return self.get_connection(fail_silently).send_messages([self])
api_1 | File "/usr/local/lib/python3.7/site-packages/django/core/mail/backends/smtp.py", line 102, in send_messages
api_1 | new_conn_created = self.open()
api_1 | File "/usr/local/lib/python3.7/site-packages/django/core/mail/backends/smtp.py", line 62, in open
api_1 | self.connection = self.connection_class(self.host, self.port, **connection_params)
api_1 | File "/usr/local/lib/python3.7/smtplib.py", line 254, in __init__
api_1 | raise SMTPConnectError(code, msg)
api_1 | smtplib.SMTPConnectError: (421, b'Server busy, too many connections')
api_1 | [31/Mar/2020 10:45:23] "POST /api/v1/auth/forgot-password/ HTTP/1.1" 500 14453