title: MIME Header in message when sending e-mail with Python
body: <p>So I am trying to send out an email using this template and using a log file as the body, the email gets sent fine. However, it has this really ugly header in the body of the message (As seen below)</p>
  
  <pre><code>From nobody Thu Mar 17 14:13:14 2011
  Content-Type: text/plain; charset="us-ascii"
  MIME-Version: 1.0
  Content-Transfer-Encoding: 7bit
  </code></pre>
  
  <p>Is there anyway to make it so the message does not include the header above? Thank you!</p>
  
  <pre><code>#!/usr/bin/python
  import smtplib
  import time
  import datetime
  from email.mime.text import MIMEText
  today = datetime.date.today()
  textfile = "/home/user/Public/stereo-restart-log"
  FROM = "my-username"
  TO = ["recipients"]
  
  SUBJECT = "Stereo log: %s" % today
  fp = open(textfile, 'rb')
  TEXT = MIMEText(fp.read())
  fp.close()
  message = """\
  From: %s
  To: %s
  Subject: %s
  
  %s
  """ % (FROM, TO, SUBJECT, TEXT)
  
  server = smtplib.SMTP('smtp.gmail.com', 587)
  server.starttls()
  server.login('my-username','mypass')
  server.sendmail(FROM, TO, message)
  server.close()
  </code></pre>