• <bdo id='MFMVo'></bdo><ul id='MFMVo'></ul>
  • <i id='MFMVo'><tr id='MFMVo'><dt id='MFMVo'><q id='MFMVo'><span id='MFMVo'><b id='MFMVo'><form id='MFMVo'><ins id='MFMVo'></ins><ul id='MFMVo'></ul><sub id='MFMVo'></sub></form><legend id='MFMVo'></legend><bdo id='MFMVo'><pre id='MFMVo'><center id='MFMVo'></center></pre></bdo></b><th id='MFMVo'></th></span></q></dt></tr></i><div id='MFMVo'><tfoot id='MFMVo'></tfoot><dl id='MFMVo'><fieldset id='MFMVo'></fieldset></dl></div>

      <tfoot id='MFMVo'></tfoot>
    1. <small id='MFMVo'></small><noframes id='MFMVo'>

    2. <legend id='MFMVo'><style id='MFMVo'><dir id='MFMVo'><q id='MFMVo'></q></dir></style></legend>
      1. SMTPAuthenticationError 5.7.14 请通过网络浏览器登录 5.7.14

        时间:2023-10-20

            <small id='6G1Cv'></small><noframes id='6G1Cv'>

            <legend id='6G1Cv'><style id='6G1Cv'><dir id='6G1Cv'><q id='6G1Cv'></q></dir></style></legend>
                  <bdo id='6G1Cv'></bdo><ul id='6G1Cv'></ul>
                  <i id='6G1Cv'><tr id='6G1Cv'><dt id='6G1Cv'><q id='6G1Cv'><span id='6G1Cv'><b id='6G1Cv'><form id='6G1Cv'><ins id='6G1Cv'></ins><ul id='6G1Cv'></ul><sub id='6G1Cv'></sub></form><legend id='6G1Cv'></legend><bdo id='6G1Cv'><pre id='6G1Cv'><center id='6G1Cv'></center></pre></bdo></b><th id='6G1Cv'></th></span></q></dt></tr></i><div id='6G1Cv'><tfoot id='6G1Cv'></tfoot><dl id='6G1Cv'><fieldset id='6G1Cv'></fieldset></dl></div>

                    <tbody id='6G1Cv'></tbody>
                • <tfoot id='6G1Cv'></tfoot>

                • 本文介绍了SMTPAuthenticationError 5.7.14 请通过网络浏览器登录 5.7.14的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我有一个脚本,它定期向收件人列表发送报告.一切正常,直到今天凌晨 4 点,当我检查收件箱并没有收到报告时.

                  I have a script which sends periodically reports to a list of recipients. Everything worked fine until today 4 am, when I checked my inbox and the reports didn't come.

                  通过调试代码:

                  import smtplib
                  username="my.user.account@gmail.com"
                  password="my.correct.password"
                  
                  server=smtplib.SMTP('smtp.gmail.com',587)
                  server.ehlo()
                  server.starttls() 
                  server.ehlo()
                  server.login(username,password)
                  
                  #if login worked, it should send a message, but it is not working, so I will suppress this part
                  
                  server.quit()
                  

                  我收到以下(旧的)结果:

                  I receive the following (old known) result:

                  (250,b'smtp.gmail.com 为您服务,[SERVERIP] SIZE35882577 8BITMIME STARTTLS ENHANCEDSTATUSCODES PIPELINING CHUNKING SMTPUTF8')(220, b'2.0.0 Ready to start TLS') (250, b'smtp.gmail.com at your服务,[SERVERIP] SIZE 35882577 8BITMIME AUTH LOGIN PLAIN XOAUTH2PLAIN-CLIENTTOKEN OAUTHBEARERXOAUTH ENHANCEDSTATUSCODES PIPELINING CHUNKING SMTPUTF8')Traceback(最近一次调用最后一次):文件<pyshell#52>",第 6 行,在server.login(username,password) 文件C:PythonPython36libsmtplib.py",第 729 行,登录在登录中引发 last_exception 文件C:PythonPython36libsmtplib.py",第 720 行initial_response_ok=initial_response_ok) 文件C:PythonPython36libsmtplib.py",第 641 行,在 auth引发 SMTPAuthenticationError(code, resp) smtplib.SMTPAuthenticationError: (534, b'5.7.14<https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbu5 5.7.14wJL_YP3XLTGPzP_UBwtyCHhzHE1y1G8R0iHaz_pxG9fBH4CePmbXuAE1qH8HvnXTgqcmKi 5.7.14P23_lJoZX_pfbNUOxQp4Fr2VhgbAjnlu3ZL_pcjVBd-TTMUVCAah6Q2-Vq5Dffm9s4UWwl 5.7.14J7V7CjE06eHkw1IlphV4lLbRKVp9Hk7vC92zLQ5zM27cbQiTM8W3lEgm>请通过网络浏览器登录 5.7.14,然后重试. 5.7.14 了解更多信息请参见 5.7.14 https://support.google.com/mail/answer/78754r131sm2964505vkr.40 - gsmtp')

                  (250, b'smtp.gmail.com at your service, [SERVERIP] SIZE 35882577 8BITMIME STARTTLS ENHANCEDSTATUSCODES PIPELINING CHUNKING SMTPUTF8') (220, b'2.0.0 Ready to start TLS') (250, b'smtp.gmail.com at your service, [SERVERIP] SIZE 35882577 8BITMIME AUTH LOGIN PLAIN XOAUTH2 PLAIN-CLIENTTOKEN OAUTHBEARER XOAUTH ENHANCEDSTATUSCODES PIPELINING CHUNKING SMTPUTF8') Traceback (most recent call last): File "<pyshell#52>", line 6, in server.login(username,password) File "C:PythonPython36libsmtplib.py", line 729, in login raise last_exception File "C:PythonPython36libsmtplib.py", line 720, in login initial_response_ok=initial_response_ok) File "C:PythonPython36libsmtplib.py", line 641, in auth raise SMTPAuthenticationError(code, resp) smtplib.SMTPAuthenticationError: (534, b'5.7.14 <https://accounts.google.com/signin/continue?sarp=1&scc=1&plt=AKgnsbu5 5.7.14 wJL_YP3XLTGPzP_UBwtyCHhzHE1y1G8R0iHaz_pxG9fBH4CePmbXuAE1qH8HvnXTgqcmKi 5.7.14 P23_lJoZX_pfbNUOxQp4Fr2VhgbAjnlu3ZL_pcjVBd-TTMUVCAah6Q2-Vq5Dffm9s4UWwl 5.7.14 J7V7CjE06eHkw1IlphV4lLbRKVp9Hk7vC92zLQ5zM27cbQiTM8W3lEgm> Please log 5.7.14 in via your web browser and then try again. 5.7.14 Learn more at 5.7.14 https://support.google.com/mail/answer/78754 r131sm2964505vkr.40 - gsmtp')

                  我尝试过的事情

                  允许安全性较低的应用程序(如 https://www.google.com/settings/security/lesssecureapps):自从我创建帐户以来,此标志已设置为 true.

                  Allow less secure apps (as indicated in https://www.google.com/settings/security/lesssecureapps): This flag was set to true since I created the account.

                  禁用验证码(如 https://accounts.google.com/DisplayUnlockCaptcha 中所示):多次访问此 URL.没有运气.

                  Disable Captcha (as indicated in https://accounts.google.com/DisplayUnlockCaptcha): Visited this URL several times. No luck.

                  通过浏览器登录:在任何计算机上通过任何 Internet 浏览器登录时,它都可以正常工作,尽管在第一次我必须插入发送到帐户的辅助电话的代码.

                  Login via browser: It works fine, when logging via any Internet Browser from any computer, although in the first times I had to insert a code sent to the account's recovery phone.

                  我遇到了其他可以尝试的方法,但我不确定它是否可行:

                  I came across other things I could try, but I am not sure it could work:

                  • 特定应用密码
                  • Oauth2
                  • 更改或重置密码

                  我可能会尝试 oauth2,但它需要更改我的代码,由于服务器中的一些限制,我想避免这种情况.

                  I will probably try oauth2, however it would require a change in my code, which I want to avoid due to some restrictions in the server.

                  推荐答案

                  我已经使用 Google Gmail API 解决了这个问题.谷歌似乎已经阻止或限制了通过未知设备登录我的帐户,因为我只能通过浏览器登录,并且在我确认了电话号码和短信发送的代码之后.

                  I have solved this using the Google Gmail API. It seems Google has either blocked or limited logins for my account through unknown devices, as I could login only via the browser and after I confirmed the telephone number and an code sent by SMS.

                  所以我决定放弃使用 smtplib 并使用 Google 用于 Gmail 的 API 实现访问:https://developers.google.com/api-client-library/python/https://developers.google.com/gmail/api/guides/sending

                  So I decided to give up using smtplib and implemented the access using the API Google uses for Gmail: https://developers.google.com/api-client-library/python/ https://developers.google.com/gmail/api/guides/sending

                  希望这对遇到此问题的其他人有所帮助.

                  Hope this helps other who had trouble with this issue.

                  这篇关于SMTPAuthenticationError 5.7.14 请通过网络浏览器登录 5.7.14的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:来自代码示例的 Gmail API 错误 - 需要类似字节的对象,而不是“str" 下一篇:使用 smtplib - Python 接收来自 Gmail 的回复

                  相关文章

                    <legend id='2X4U4'><style id='2X4U4'><dir id='2X4U4'><q id='2X4U4'></q></dir></style></legend>
                      <bdo id='2X4U4'></bdo><ul id='2X4U4'></ul>

                      <small id='2X4U4'></small><noframes id='2X4U4'>

                      <tfoot id='2X4U4'></tfoot>
                      <i id='2X4U4'><tr id='2X4U4'><dt id='2X4U4'><q id='2X4U4'><span id='2X4U4'><b id='2X4U4'><form id='2X4U4'><ins id='2X4U4'></ins><ul id='2X4U4'></ul><sub id='2X4U4'></sub></form><legend id='2X4U4'></legend><bdo id='2X4U4'><pre id='2X4U4'><center id='2X4U4'></center></pre></bdo></b><th id='2X4U4'></th></span></q></dt></tr></i><div id='2X4U4'><tfoot id='2X4U4'></tfoot><dl id='2X4U4'><fieldset id='2X4U4'></fieldset></dl></div>