提问人:AJS 提问时间:10/17/2023 更新时间:10/17/2023 访问量:46
如何在 python 中使用 smtp 连接到正确的 smtp 服务器以发送电子邮件
How to connect to the correct smtp server for sending email using smtp in python
问:
我正在为客户工作,我必须使用 SMTP 在 Outlook 中从我的工作电子邮件 ID ([email protected]) 发送带有附件的邮件。
我使用 smtp.outlook.com 作为服务器,它不起作用,那么如何找到域的正确服务器呢?
服务器=?
with smtplib.SMTP(SERVER, 587) as server:
server.starttls()
print("connected to server")
server.login(user, PASS)
server.sendmail(FROM, TO, text)
答: 暂无答案
评论
smtp-mail.outlook.com