【发布时间】:2017-02-13 16:27:56
【问题描述】:
我正在尝试运行一个在 python 3.5 中使用 smtplib 发送电子邮件的程序,但它不工作。正在发送电子邮件,收件人在其收件箱中看到一封电子邮件,但它是空的(邮件内容不存在)。代码看起来有点像这样:
message = "Test Message"
server = smtplib.SMTP("smtp.live.com", 25)
server.starttls()
server.login("someone@hotmail.com", "someones_password")
server.sendmail("someone@hotmail.com", someone_else@somewhere.com, message)
谁能告诉我我做错了什么?
【问题讨论】: