0
我一直在使用python中的smtplib模块从gmail帐户发送文本消息,并且我最近连接到服务器的请求开始被拒绝。我的代码是没有什么特别的:使用smtplib模块的请求被拒绝
import smtplib
server = smtplib.SMTP("smtp.gmail.com", 587)
server.starttls()
server.login('<gmail_address>', '<gmail_password>’)
server.sendmail('<from>', '<number>@mms.att.net', '<msg>’)
的误差在4号线
raise SMTPAuthenticationError(code, resp)
smtplib.SMTPAuthenticationError: (534,
抛出和Gmail通知我,他们已封锁的应用进行的登录尝试,因为它没不符合现代安全要求。
我希望找到一个解决办法,允许我继续使用smtplib模块发送短信。
试试这个:http://serverfault.com/questions/635139/how-to-fix-send-mail-authorization-failed-534-5-7-14 – noteness
这工作完美,非常感谢你! – SAMO