`
netcome
  • 浏览: 485231 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Python的Gmail模块 libgmail

阅读更多

libgmail 是 Python 用来访问 Gmail 服务的模块。

示例代码:

import libgmail

ga = libgmail.GmailAccount("google@gmail.com", "mymailismypass")
ga.login()
folder = ga.getMessagesByFolder('inbox')

for thread in folder:
  print thread.id, len(thread), thread.subject
  for msg in thread:
    print "  ", msg.id, msg.number, msg.subject
    print msg.source
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics