【錯誤】發郵件報錯Exception Value: Connection unexpectedly closed
阿新 • • 發佈:2019-04-08
led from ati raise msg cfile pre eth sendmai
Environment: Request Method: POST Request URL: http://127.0.0.1:8000/auth/signup/ Django Version: 1.11.15 Python Version: 3.6.7 Installed Applications: ['django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'app_author.apps.AppAuthorConfig', 'captcha'] Installed Middleware: ['django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware'] Traceback: File "/home/python/.local/share/virtualenvs/django_loopflower_env-CLksi-mz/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner 41. response = get_response(request) File "/home/python/.local/share/virtualenvs/django_loopflower_env-CLksi-mz/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response 187. response = self.process_exception_by_middleware(e, request) File "/home/python/.local/share/virtualenvs/django_loopflower_env-CLksi-mz/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response 185. response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/python_project/app_workflow/app_author/views/signup.py" in signup 47. send_email(email, code) File "/python_project/app_workflow/app_author/service/send_mail.py" in send_email 29. msg.send() File "/home/python/.local/share/virtualenvs/django_loopflower_env-CLksi-mz/lib/python3.6/site-packages/django/core/mail/message.py" in send 348. return self.get_connection(fail_silently).send_messages([self]) File "/home/python/.local/share/virtualenvs/django_loopflower_env-CLksi-mz/lib/python3.6/site-packages/django/core/mail/backends/smtp.py" in send_messages 111. sent = self._send(message) File "/home/python/.local/share/virtualenvs/django_loopflower_env-CLksi-mz/lib/python3.6/site-packages/django/core/mail/backends/smtp.py" in _send 127. self.connection.sendmail(from_email, recipients, message.as_bytes(linesep='\r\n')) File "/usr/lib/python3.6/smtplib.py" in sendmail 882. (code, resp) = self.data(msg) File "/usr/lib/python3.6/smtplib.py" in data 569. (code, msg) = self.getreply() File "/usr/lib/python3.6/smtplib.py" in getreply 394. raise SMTPServerDisconnected("Connection unexpectedly closed") Exception Type: SMTPServerDisconnected at /auth/signup/ Exception Value: Connection unexpectedly closed
【錯誤】發郵件報錯Exception Value: Connection unexpectedly closed