为什么我无法使用python中的POP(poplib)登录我的Gmail?

时间:2016-09-10 18:00:42

标签: python email poplib getpasswd

我正在尝试使用POP登录我的Gmail。我已在我的Gmail隐私设置上启用了POP / IMAP,以及为不太安全的应用启用了#34;访问#34;。我总是得到同样的错误。

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<input id="form_number" type="number" value="" />

<button id="trigger-x">ADD #</button>
<button id="trigger-clear">CLEAR</button>

<div id="div_number" class="total"></div>

我不知道我做错了什么。这是我的源代码。

Traceback (most recent call last):
File "scan.py", line 10, in <module>
R.pass_(passw)
File"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/poplib.py", line 197, in pass_
return self._shortcmd('PASS %s' % pswd)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/poplib.py", line 160, in _shortcmd
return self._getresp()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/poplib.py", line 136, in _getresp
raise error_proto(resp)
poplib.error_proto: -ERR [AUTH] Username and password not accepted.

0 个答案:

没有答案
相关问题