Download an attachment from an IMAP email
vincent at vincentdavis.net
Thu Feb 3 23:14:09 CET 2011
I have a few emails I am trying to download from my google account. I seem
to be getting the message but each of these messages have an attachment. I
don't understand what I ned to do to get and save the attachment to a local
Here is what I have so far.
M = imaplib.IMAP4_SSL(IMAP_SERVER, IMAP_PORT)
rc, resp = M.login('xxxxx at xxxx', 'XXXXX')
print rc, resp
M.search(None, 'FROM', 'someone at logitech.com')
#M.fetch(121, '(body[header.fields (subject)])')
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list