我正在使用python开发自己的软件。对于bug报告部分,我创建了一个outlook帐户。这是因为如果密码泄漏,这不是一个大问题。但是我找不到使用outlook发送邮件的方法。 这就是我尝试过的
from smtplib import SMTP
server = SMTP("smtp.outlook.com", 465)
server.starttls()
server.login("myoutlookaccount@outlook.com", "mypassword")
这就是我在等待了5分钟后得到的错误
TimeoutError: [WinError 10060] Een verbindingspoging is mislukt omdat de verbonden party niet correct
heeft geantwoord na een bepaalde tijd, of de gemaakte verbinding is mislukt omdat de verbonden host
niet heeft geantwoord
(翻译)
TimeoutError: [WinError 10060] A connection attempt failed because the connected party was not correct
replied after a certain time, or the connection created failed because the connected host
did not reply
其中的某些值对于outlook.com不正确。下面是它的外观:
server = SMTP("smtp-mail.outlook.com", 587)
相关问题 更多 >
编程相关推荐