title: 'str' object has no attribute 'decode'. Python 3 error?
body: <p>Here is my code:</p>
  
  <pre><code>import imaplib
  from email.parser import HeaderParser
  
  conn = imaplib.IMAP4_SSL('imap.gmail.com')
  conn.login('example@gmail.com', 'password')
  conn.select()
  conn.search(None, 'ALL')
  data = conn.fetch('1', '(BODY[HEADER])')
  header_data = data[1][0][1].decode('utf-8')
  </code></pre>
  
  <p>at this point I get the error message </p>
  
  <pre><code>AttributeError: 'str' object has no attribute 'decode'
  </code></pre>
  
  <p>Python 3 doesn't have decode anymore, am I right? how can I fix this? </p>
  
  <p>Also, in:</p>
  
  <pre><code>data = conn.fetch('1', '(BODY[HEADER])')
  </code></pre>
  
  <p>I am selecting only the 1st email. How do I select all?</p>