Changeset 109:bfb2aabc0b11 for run_altfetch.py
- Timestamp:
- 12/17/09 12:00:01 (2 years ago)
- Branch:
- default
- Files:
-
- 1 modified
-
run_altfetch.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
run_altfetch.py
r105 r109 1 1 from pprint import pprint 2 2 from imapclient import IMAPClient 3 from imapclient.response_parser import parse_response 3 4 4 5 def main(): … … 8 9 msgs = i.search() 9 10 i._imap.debug = 5 10 lines = i.altfetch(msgs [0], ['RFC822'])11 lines = i.altfetch(msgs, ['ENVELOPE', 'BODYSTRUCTURE']) 11 12 12 print lines[0] 13 body = '\r\n'.join(lines[1:-1]) 14 body += '\r\n' 15 print body 16 print len(body) 13 body = '\r\n'.join(lines) 14 #body += '\r\n' 17 15 16 for x in parse_response(body): 17 print x 18 18 19 19 if __name__ == '__main__':
