Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. # Obtain BODYSTRUCTURE call
  2. data, result = imap_instance.uid('fetch', email_uid, '(BODYSTRUCTURE)')
  3. part_body_index, part_charset = parse_BODY_index_and_charset_from_response(data)
  4.  
  5. text_part, result = imap_instance.uid('fetch', email_uid, '(BODY['+str(part_body_index)+'])')
  6.  
  7. if len(part_charset) > 0:
  8. try:
  9. text_part = text_part.decode(part_charset, 'ignore')
  10. except:
  11. pass
  12.  
  13. # Content of "text_part" variable after this should be text with no encoded characters...
  14. # But that's not the case
  15.  
  16. A 05/04/2013, =E0s 11:09, XYZ escreveu:>
  17.  
  18. In=EDcio da mensagem reenviada:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement