[英]How to Send Mails with attachments from your outlook using Python
[英]Send mails using python and outlook
我正在使用 python 開發自己的軟件。 對於錯誤報告部分,我創建了一個 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)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.