Python pull back plain text body from message from IMAP account
问题 I have been working on this and am missing the mark. I am able to connect and get the mail via imaplib. msrv = imaplib.IMAP4(server) msrv.login(username,password) # Get mail msrv.select() #msrv.search(None, 'ALL') typ, data = msrv.search(None, 'ALL') # iterate through messages for num in data[0].split(): typ, msg_itm = msrv.fetch(num, '(RFC822)') print msg_itm print num But what I need to do is get the body of the message as plain text and I think that works with the email parser but I am