Violation of protocol (SSL or TLS) error when configuring an email from outlook web app

Hi,

Hello,
Tutor version: 13.3.1

I have errors when configuring an email account with outlook web app, whether it uses SSL or TLS, it always gives me an error when trying to send the mail.

Has anyone experienced the same error when configuring an email from the same provider and how has it been resolved?

I attach the one corresponding to the error with the TLS option set to true

2022-06-08 01:16:27,260 WARNING 1 [py.warnings] [user None] [ip None] warnings.py:109 - /openedx/venv/lib/python3.8/site-packages/boto/plugin.py:40: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp

2022-06-08 01:16:27,340 WARNING 1 [py.warnings] [user None] [ip None] warnings.py:109 - /openedx/venv/lib/python3.8/site-packages/botocore/vendored/requests/packages/urllib3/_collections.py:1: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working
  from collections import Mapping, MutableMapping

2022-06-08 01:16:29,577 WARNING 1 [py.warnings] [user None] [ip None] warnings.py:109 - /openedx/edx-platform/openedx/core/types/admin.py:49: DeprecationWarning: Django 3.2+ available: the _admin_display method and the AdminMethodclass should be removed from openedx.core.types
  warnings.warn(

Traceback (most recent call last):
  File "./manage.py", line 106, in <module>
    execute_from_command_line([sys.argv[0]] + django_args)
  File "/openedx/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "/openedx/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 413, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/openedx/venv/lib/python3.8/site-packages/django/core/management/base.py", line 354, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/openedx/venv/lib/python3.8/site-packages/django/core/management/base.py", line 398, in execute
    output = self.handle(*args, **options)
  File "/openedx/venv/lib/python3.8/site-packages/django/core/management/commands/shell.py", line 87, in handle
    exec(options['command'], globals())
  File "<string>", line 1, in <module>
  File "/openedx/venv/lib/python3.8/site-packages/django/core/mail/__init__.py", line 61, in send_mail
    return mail.send()
  File "/openedx/venv/lib/python3.8/site-packages/django/core/mail/message.py", line 284, in send
    return self.get_connection(fail_silently).send_messages([self])
  File "/openedx/venv/lib/python3.8/site-packages/django/core/mail/backends/smtp.py", line 102, in send_messages
    new_conn_created = self.open()
  File "/openedx/venv/lib/python3.8/site-packages/django/core/mail/backends/smtp.py", line 67, in open
    self.connection.starttls(keyfile=self.ssl_keyfile, certfile=self.ssl_certfile)
  File "/opt/pyenv/versions/3.8.12/lib/python3.8/smtplib.py", line 788, in starttls
    self.sock = context.wrap_socket(self.sock,
  File "/opt/pyenv/versions/3.8.12/lib/python3.8/ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
  File "/opt/pyenv/versions/3.8.12/lib/python3.8/ssl.py", line 1040, in _create
    self.do_handshake()
  File "/opt/pyenv/versions/3.8.12/lib/python3.8/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1131)

I attach the log to the error with SSL set to true

2022-06-08 01:24:32,034 WARNING 1 [py.warnings] [user None] [ip None] warnings.py:109 - /openedx/edx-platform/openedx/core/types/admin.py:49: DeprecationWarning: Django 3.2+ available: the _admin_display method and the AdminMethodclass should be removed from openedx.core.types
  warnings.warn(

Traceback (most recent call last):
  File "./manage.py", line 106, in <module>
    execute_from_command_line([sys.argv[0]] + django_args)
  File "/openedx/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "/openedx/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 413, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/openedx/venv/lib/python3.8/site-packages/django/core/management/base.py", line 354, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/openedx/venv/lib/python3.8/site-packages/django/core/management/base.py", line 398, in execute
    output = self.handle(*args, **options)
  File "/openedx/venv/lib/python3.8/site-packages/django/core/management/commands/shell.py", line 87, in handle
    exec(options['command'], globals())
  File "<string>", line 1, in <module>
  File "/openedx/venv/lib/python3.8/site-packages/django/core/mail/__init__.py", line 61, in send_mail
    return mail.send()
  File "/openedx/venv/lib/python3.8/site-packages/django/core/mail/message.py", line 284, in send
    return self.get_connection(fail_silently).send_messages([self])
  File "/openedx/venv/lib/python3.8/site-packages/django/core/mail/backends/smtp.py", line 102, in send_messages
    new_conn_created = self.open()
  File "/openedx/venv/lib/python3.8/site-packages/django/core/mail/backends/smtp.py", line 67, in open
    self.connection.starttls(keyfile=self.ssl_keyfile, certfile=self.ssl_certfile)
  File "/opt/pyenv/versions/3.8.12/lib/python3.8/smtplib.py", line 788, in starttls
    self.sock = context.wrap_socket(self.sock,
  File "/opt/pyenv/versions/3.8.12/lib/python3.8/ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
  File "/opt/pyenv/versions/3.8.12/lib/python3.8/ssl.py", line 1040, in _create
    self.do_handshake()
  File "/opt/pyenv/versions/3.8.12/lib/python3.8/ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1131)

To configure the email account I have followed the documentation published on the official site, only changing the parameters of outlook web app.

And the errors that I share are from the command line published in the same documentation link.

1 Like