0
我用來創建SMTP服務器的lib secure_smtpd。當我生成證書,並使用它的SSL連接我趕上異常(測試我使用Opera郵件客戶端和Bat!):Python的SMTP服務器使用SSL:握手錯誤
SSLError: _ssl.c:489: The handshake operation timed out
當我測試使用Python腳本一切正常:
smtpObj = smtplib.SMTP_SSL('localhost',2000)
smtpObj.set_debuglevel(1)
smtpObj.login('testuser', '111111')
msg = MIMEMultipart('alternative')
msg['Subject'] = "my subj SSL"
msg['From'] = sender
msg['To'] = "[email protected]"
msg.attach(MIMEText("Hello world!",'html'))
smtpObj.sendmail(sender, [toemail], msg.as_string())
有人可以幫助解決握手問題嗎? 我使用Python 2.7.3
在Opera郵件客戶端我設置複選框「TLS」靠近我使用的端口。 – Evgeniy
通常TLS用於StartTLS。使用Wireshark獲取流量,並查看從客戶端發送到服務器的內容。 –