V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
mingming
V2EX  ›  Python

python 使用imap 协议连接qq mail 如何设置?

  •  
  •   mingming · Jan 9, 2013 · 5699 views
    This topic created in 4869 days ago, the information mentioned may be changed or developed.
    我使用imaplib库,搜索qq的邮箱发现搜索不到邮件,同样的代码使用gmail 就可以。
    使用关键字搜索的时候也不支持。
    代码如下:
    password = "xxxx"
    user_name = '[email protected]'
    mail = imaplib.IMAP4("imap.qq.com")
    result, data = mail_conn.uid('search',None, '(SINCE 1-Aug-2011)')
    有没有哪位遇到过?
    对了,使用ssl加密也不可以。
    5 replies    2014-07-08 15:04:02 +08:00
    znetor
        1
    znetor  
       Dec 2, 2013
    我也是啊
    mingming
        2
    mingming  
    OP
       Dec 2, 2013
    @znetor 太久远了,貌似是因为 QQ 不支持按照时间搜索。你可以试试其他的搜索方式。
    znetor
        3
    znetor  
       Dec 12, 2013
    @mingming qq 用 search(None, 'ALL') 返回的邮件 和qq mail web里的不一样怎么办?
    mingming
        4
    mingming  
    OP
       Dec 12, 2013
    @znetor 首先你要选择 “文件夹” ,比如”inbox“,你说的qq mail web 界面是分文件夹显示的。
    wangyongbo
        5
    wangyongbo  
       Jul 8, 2014
    QQ邮箱 对imap 的search 命令支持不全。而且不能获取所有的邮件,最多只能读取一个月的。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1652 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 16:21 · PVG 00:21 · LAX 09:21 · JFK 12:21
    ♥ Do have faith in what you're doing.