500 when user try to register

The user will show up in the admin user page, but seems not receiving confirmation email

[2021-06-26 17:07:03,887] ERROR in app: Exception on /register [POST]
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.8/dist-packages/flask_restplus/api.py", line 584, in error_router
    return original_handler(e)
  File "/usr/local/lib/python3.8/dist-packages/flask_cors/extension.py", line 161, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/local/lib/python3.8/dist-packages/flask/_compat.py", line 39, in reraise
    raise value
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/usr/local/lib/python3.8/dist-packages/flask_security/decorators.py", line 614, in wrapper
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/flask_security/views.py", line 281, in register
    user = register_user(form)
  File "/usr/local/lib/python3.8/dist-packages/flask_security/registerable.py", line 63, in register_user
    send_mail(
  File "/usr/local/lib/python3.8/dist-packages/flask_security/utils.py", line 662, in send_mail
    _security._mail_util.send_mail(
  File "/usr/local/lib/python3.8/dist-packages/flask_security/mail_util.py", line 62, in send_mail
    mail.send(msg)
  File "/usr/local/lib/python3.8/dist-packages/flask_mail.py", line 491, in send
    with self.connect() as connection:
  File "/usr/local/lib/python3.8/dist-packages/flask_mail.py", line 144, in __enter__
    self.host = self.configure_host()
  File "/usr/local/lib/python3.8/dist-packages/flask_mail.py", line 156, in configure_host
    host = smtplib.SMTP_SSL(self.mail.server, self.mail.port)
  File "/usr/lib/python3.8/smtplib.py", line 1034, in __init__
    SMTP.__init__(self, host, port, local_hostname, timeout,
  File "/usr/lib/python3.8/smtplib.py", line 253, in __init__
    (code, msg) = self.connect(host, port)
  File "/usr/lib/python3.8/smtplib.py", line 339, in connect
    self.sock = self._get_socket(host, port, self.timeout)
  File "/usr/lib/python3.8/smtplib.py", line 1042, in _get_socket
    new_socket = self.context.wrap_socket(new_socket,
  File "/usr/local/lib/python3.8/dist-packages/gevent/_ssl3.py", line 114, in wrap_socket
    return self.sslsocket_class(
  File "/usr/local/lib/python3.8/dist-packages/gevent/_ssl3.py", line 312, in __init__
    raise x
  File "/usr/local/lib/python3.8/dist-packages/gevent/_ssl3.py", line 308, in __init__
    self.do_handshake()
  File "/usr/local/lib/python3.8/dist-packages/gevent/_ssl3.py", line 667, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1123)