擅长:python、mysql、java
<pre><code>import imaplib
obj = imaplib.IMAP4_SSL('imap.gmail.com',993)
obj.login('userid','password')
obj.select('Sent') # <-- response like ('OK', ['74']) --> total no. of mail in sent folder
obj.uid('SEARCH',None,'All') # <-- Returns the list of uids of the sent folder.
</code></pre>