V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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 · 2013-01-09 18:02:34 +08:00 · 5113 次点击
    这是一个创建于 4147 天前的主题,其中的信息可能已经有所发展或是发生改变。
    我使用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 条回复    2014-07-08 15:04:02 +08:00
    znetor
        1
    znetor  
       2013-12-02 16:26:33 +08:00
    我也是啊
    mingming
        2
    mingming  
    OP
       2013-12-02 20:27:12 +08:00
    @znetor 太久远了,貌似是因为 QQ 不支持按照时间搜索。你可以试试其他的搜索方式。
    znetor
        3
    znetor  
       2013-12-12 10:53:45 +08:00
    @mingming qq 用 search(None, 'ALL') 返回的邮件 和qq mail web里的不一样怎么办?
    mingming
        4
    mingming  
    OP
       2013-12-12 15:43:32 +08:00
    @znetor 首先你要选择 “文件夹” ,比如”inbox“,你说的qq mail web 界面是分文件夹显示的。
    wangyongbo
        5
    wangyongbo  
       2014-07-08 15:04:02 +08:00
    QQ邮箱 对imap 的search 命令支持不全。而且不能获取所有的邮件,最多只能读取一个月的。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2214 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 03:59 · PVG 11:59 · LAX 20:59 · JFK 23:59
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.