title: Gmail displays both HTML and text and HTML parts of email
body: <p>I am sending an email to a gmail account using Python. This is the code I'm using</p>
  
  <pre><code>msg = email.mime.multipart.MIMEMultipart()
  msg['From'] = 'myemail@gmail.com'
  msg['To'] = 'toemail@gmail.com'
  msg['Subject'] = 'HTML test'
  msg_html = email.mime.text.MIMEText('&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;b&gt;This is HTML&lt;/b&gt;&lt;/body&gt;&lt;/html&gt;', 'html')
  msg_txt = email.mime.text.MIMEText('This is text','plain')
  msg.attach(msg_html)
  msg.attach(msg_txt)
  #SNIP SMTP connection code
  smtpConn.sendmail('myemail@gmail.com', 'toemail@gmail.com', msg.as_string())
  </code></pre>
  
  <p>When I view this email in gmail both the HTML and text version are shown like this:</p>
  
  <p><strong>This is HTML</strong></p>
  
  <p>This is text</p>
  
  <p>It should be either displaying text or html, what causes this behavior.</p>