title: Python pull back plain text body from message from IMAP account
body: <p>I have been working on this and am missing the mark.</p>
  
  <p>I am able to connect and get the mail via imaplib.</p>
  
  <pre><code>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 
  </code></pre>
  
  <p>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 having problems getting it working.</p>
  
  <p>Does anyone have a complete example I can look at?</p>
  
  <p>Thanks,</p>