Ala*_*iah 4 python gmail smtp smtpclient
尝试使用 SMTP 登录 Gmail 帐户时,出现以下错误消息:
SMTPAuthenticationError(code, resp)
smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password not accepted.
Run Code Online (Sandbox Code Playgroud)
导致错误的代码:
import smtplib
server = smtplib.SMTP("smtp.gmail.com", 587)
server.starttls()
server.login("sending@gmail.com", "your_password")
message = "TEST"
server.sendmail("sending@gmail.com", "receiving@gmail.com", message)
server.quit()
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5176 次 |
| 最近记录: |