How to fix ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1056)?
问题 I am trying to send an email with python, but it keeps saying ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1056) . Here is my code: server = smtplib.SMTP_SSL('smtp.mail.com', 587) server.login("something0@mail.com", "password") server.sendmail( "something0@mail.com", "something@mail.com", "email text") server.quit() Do you know what is wrong? 回答1: That usually happens when the client doesn't understand the ServerHello message that is supposed to come from the server.