title: Modify Subject, Body after message_from_string in Python
body: <p>I am trying to modify an email2sms script for Smstools 3.</p>
  
  <p>A sample incoming sms file:</p>
  
  <pre><code>$ cat /var/spool/sms/incoming/GSM1.AtEO8G
  From: 950
  From_TOA: D0 alphanumeric, unknown
  From_SMSC: 421950900050
  Sent: 17-09-13 17:41:17
  Received: 17-09-13 17:48:21
  Subject: GSM1
  Modem: GSM1
  IMSI: 231030011459971
  Report: no
  Alphabet: ISO
  Length: 5
  
  test1
  </code></pre>
  
  <p>The script is using the following code to format the message:</p>
  
  <pre><code>if (statuscode == 'RECEIVED'):
      smsfile = open(smsfilename)
      msg = email.message_from_string(smsfile.read())
      msg['Original-From'] = msg['From']
      msg['To'] = forwardto
  </code></pre>
  
  <p>The problem: I want to modify Subject field in the code above. I tried something <code>msg['Subject '] = 'Example'</code> (after msg['To']), but the Subject field is not overwrited, but doubled. Anybody knows how to modify this after <code>email.message_from_string()</code> function?</p>