【问题标题】:Unable to run a simple SMTP server无法运行简单的 SMTP 服务器
【发布时间】:2023-02-09 15:02:55
【问题描述】:

连接尝试失败,因为连接方在一段时间后没有正确响应,或者建立连接失败,因为连接的主机没有响应

import smtplib

senders='jsujith1311@gmail.com'
password="ekjhgisxavzw"#Not Original Password
connection=smtplib.SMTP("smtp.gmail.com")
connection.starttls()
connection.login(user=senders,password=password)
connection.sendmail(from_addr=senders,to_addrs=senders,msg="HI")
connection.close()

有人能帮忙吗

我最初需要在我的设备上运行一个简单的 smtp 服务器,然后我想根据我的需要配置它。

【问题讨论】:

    标签: python smtplib


    【解决方案1】:

    您需要将密码更改为应用程序密码。请点击以下链接:https://support.google.com/mail/answer/185833?hl=en

    【讨论】:

      猜你喜欢
      • 2023-04-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-05-09
      • 2020-08-05
      • 2012-01-25
      • 1970-01-01
      相关资源
      最近更新 更多