Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STARTTLS Issues #55

Open
thebeline opened this issue Mar 2, 2021 · 1 comment
Open

STARTTLS Issues #55

thebeline opened this issue Mar 2, 2021 · 1 comment

Comments

@thebeline
Copy link

I am receiving a STARTTLS WRONG_VERSION_NUMBER error. My email server is used by a number of people, and many different application clients, without issue. I believe the problem here is related to Python 3.5, and this StackOverflow issue.

I don't know, however, as I have dug through the YagMail repo and found no mention of this issue (and I feel like it would show up). Any help would be fantastic.

Configured with my email domain, port 587 Use TLS/Use SSL, the correct username and password, and Thunderbird connects to the account just fine...

@thebeline
Copy link
Author

Full Error from the log:

2021-03-02 15:22:19,436 - octoprint.plugins.emailnotifier - ERROR - Email notification error: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1056)
Traceback (most recent call last):
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_emailnotifier/__init__.py", line 152, in on_api_command
    self.send_notification(subject, body, snapshot, event="test")
  File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_emailnotifier/__init__.py", line 193, in send_notification
    mailer.send(to=emails, subject=subject, contents=body, headers={"Date": formatdate()})
  File "/home/pi/oprint/lib/python3.7/site-packages/yagmail/sender.py", line 153, in send
    self.login()
  File "/home/pi/oprint/lib/python3.7/site-packages/yagmail/sender.py", line 206, in login
    self._login(self.credentials)
  File "/home/pi/oprint/lib/python3.7/site-packages/yagmail/sender.py", line 213, in _login
    self.smtp = self.connection(self.host, self.port, **self.kwargs)
  File "/usr/lib/python3.7/smtplib.py", line 1031, in __init__
    source_address)
  File "/usr/lib/python3.7/smtplib.py", line 251, in __init__
    (code, msg) = self.connect(host, port)
  File "/usr/lib/python3.7/smtplib.py", line 336, in connect
    self.sock = self._get_socket(host, port, self.timeout)
  File "/usr/lib/python3.7/smtplib.py", line 1039, in _get_socket
    server_hostname=self._host)
  File "/usr/lib/python3.7/ssl.py", line 412, in wrap_socket
    session=session
  File "/usr/lib/python3.7/ssl.py", line 853, in _create
    self.do_handshake()
  File "/usr/lib/python3.7/ssl.py", line 1117, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1056)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant