Python的Gmail模块 libgmail

fmms 13年前
     <p>libgmail 是 Python 用来访问 Gmail 服务的模块。</p>    <p>示例代码:</p>    <pre class="brush:python; toolbar: true; auto-links: false;">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</pre>    <p><strong>项目主页:</strong><a href="http://www.open-open.com/lib/view/home/1326935320312" target="_blank">http://www.open-open.com/lib/view/home/1326935320312</a></p>    <p></p>