title: Outlook and Thunderbird do not receive attachment when I send from Python using Mime
body: <p>I was trying to send an email with attachment using MimeBase in python. I can even send the email and receive the pdf attachment when I'm not using Thunderbird or Outlook and open the mailbox in the browser.</p>
  
  <pre><code>mensagem = MIMEMultipart('alternative')
  mensagem['Subject'] = Header(sTituloEmail.encode('utf-8'), 'UTF-8').encode()
  mensagem['To'] = Header(sEmailTo.encode('utf-8'), 'UTF-8').encode()
  mensagem['CC'] = Header(sEmailCC.encode('utf-8'), 'UTF-8').encode()
  mensagem['From'] = Header(sEmailFrom.encode('utf-8'), 'UTF-8').encode()
  
  # Corpo da mensagem
  mensagem.attach(MIMEText(sTextEmail.encode('utf-8'), 'html', 'UTF-8'))
  
  ## Arquivos anexos.
  mime = MIMEBase('application', 'x-pdf') #I've used pdf too and did the same thing
  mime.set_payload(open('out.pdf', 'rb').read())
  encoders.encode_base64(mime)
  mime.add_header('Content-Disposition', 'attachment; filename="%s"' % os.path.basename('out.pdf'))
  mensagem.attach(mime)
  </code></pre>