title: Unable to retrive G-mail with python3
body: <p>I'm unable to find ANY code that will function to retrieve Gmail.</p>
  
  <pre><code>import poplib
  from email import parser
  
  SERVER = "pop.gmail.com"
  USER  = "user@gmail.com"
  PASSWORD = "password"
  
  pop_conn = poplib.POP3_SSL(SERVER)
  pop_conn.user(USER)
  pop_conn.pass_(PASSWORD)
  #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'])
  </code></pre>
  
  <p>This produces only:</p>
  
  <blockquote>
    <p>TypeError                                 Traceback (most recent call last)
        &lt;ipython-input-8-e557fa99ae8d> in ()
             12 messages = [pop_conn.retr(i) for i in range(1, len(pop_conn.list()[1]) + 1)]
             13 # Concat message pieces:
        ---> 14 messages = ["\n".join(mssg[1]) for mssg in messages]
             15 #Parse message intom an email object:
             16 messages = [parser.Parser().parsestr(mssg) for mssg in messages]</p>
    
    <p>&lt;ipython-input-8-e557fa99ae8d> in (.0)
             12 messages = [pop_conn.retr(i) for i in range(1, len(pop_conn.list()[1]) + 1)]
             13 # Concat message pieces:
        ---> 14 messages = ["\n".join(mssg[1]) for mssg in messages]
             15 #Parse message intom an email object:
             16 messages = [parser.Parser().parsestr(mssg) for mssg in messages]</p>
    
    <p>TypeError: sequence item 0: expected str instance, bytes found</p>
  </blockquote>
  
  <p>I'VE SPENT DAYS trying to do a "simple" e-mail retrieve, and EVERY scrap of code I've found is totally non-functional.</p>
  
  <p>Can anyone actually get Gmail, with subjects, etc?</p>