title: How to receive mail using python
body: <p>I would like to receive email using python. So far I have been able to get the subject but not the body. Here is the code I have been using:</p>
  
  <pre><code>import poplib
  from email import parser
  pop_conn = poplib.POP3_SSL('pop.gmail.com')
  pop_conn.user('myusername')
  pop_conn.pass_('mypassword')
  #Get messages from server:
  messages = [pop_conn.retr(i) for i in range(1, len(pop_conn.list()[1]) + 1)]
  # Concat message pieces:
  messages = ["\n".join(mssg[1]) for mssg in messages]
  #Parse message intom an email object:
  messages = [parser.Parser().parsestr(mssg) for mssg in messages]
  for message in messages:
      print message['subject']
      print message['body']
  pop_conn.quit()
  </code></pre>
  
  <p>My issue is that when I run this code it properly returns the Subject but not the body. So if I send an email with the subject "Tester" and the body "This is a test message" it looks like this in IDLE.</p>
  
  <pre><code>&gt;&gt;&gt;&gt;Tester &gt;&gt;&gt;&gt;None
  </code></pre>
  
  <p>So it appears to be accurately assessing the subject but not the body, I think it is in the parsing method right? The issue is that I don't know enough about these libraries to figure out how to change it so that it returns both a subject and a body.</p>