Are there libraries for email message parsing (particularly, from Gmail开发者_如何学C's IMAP server) in Python (except for the standard email library)?
Or if not, maybe there is some C++ library for this purpose (and I'll be able to use it through SWIG)?
This question does not make sense. You can access GMail either using IMAP or POP3. And for parsing retrieved emails you use the 'email' module of Python. Python provides support for all this out-of-the-box "all batteries included".
http://libgmail.sourceforge.net/ is a Python bindings to Gmail. Also you have Gdata apis in Python http://pypi.python.org/pypi/gdata/2.0.4 which can help interact with Gmail.
For other stuffs, the standard library module email is good pretty good.
And Email messages are formatted according to RFC2822, a standard library module named rfc822
and mimetools
may help you to deal with the contents of the email.
精彩评论