title: Get From Address from message_from_string() in Python
body: <p>Can someone please tell me how to get the from address from email.message_from_string() in Python? Thanks! I tried</p>
  
  <pre><code>message = email.message_from_string(email_text)
  from = message['From']
  </code></pre>
  
  <p>However, that did not seem to work.</p>
  
  <p>Here is the email I am parsing:</p>
  
  <pre><code>Received: (qmail 16903 invoked by uid 30297); 27 Jul 2013 15:16:51 -0000
  Received: from unknown (HELO p3pismtp01-015.prod.phx3.secureserver.net) ([10.6.12.15])
            (envelope-sender &lt;tlovett88@gmail.com&gt;)
            by p3plsmtp10-03.prod.phx3.secureserver.net (qmail-1.03) with SMTP
            for &lt;reply@guestretain.com&gt;; 27 Jul 2013 15:16:51 -0000
  X-IronPort-Anti-Spam-Result: AkYDACPh81FKfVKyk2dsb2JhbABbgkQCgUVUvQmBEAgWDgEBAQEHCwsJFAQkghsJAQEEAUABGx4DAQsGBQEBAQECBQM4IgERAQUBHAYTh30BAwkGmxaMT4J/hBcKGScNZId0AQUMj3iEBQOXX49nFimDAYFVIA
  Received: from mail-we0-f178.google.com ([74.125.82.178])
    by p3pismtp01-015.prod.phx3.secureserver.net with ESMTP; 27 Jul 2013 08:16:51 -0700
  Received: by mail-we0-f178.google.com with SMTP id u57so2691391wes.23
          for &lt;reply@guestretain.com&gt;; Sat, 27 Jul 2013 08:16:50 -0700 (PDT)
  DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
          d=gmail.com; s=20120113;
          h=mime-version:in-reply-to:references:date:message-id:subject:from:to
           :content-type;
          bh=yU9O8/uUeQbclKzg3n9YD5bu4chhx/D44TL6gOzd2ag=;
          b=aFXVUYwpBwvVfAzzTQSbpAIR1rbMq/I32DPy1DFLpgqgbtIrmUCbp/EQJyvqupxXSe
           chZmaH7ALuMurnlTbpjOLqHBZx550U9gmYl/+tk6Ql7HgYOsYW+0eIpeyWGfgAlgyz3O
           ISyiKyjhjLVs6Cw01LJW9n2zgssNqcE8uMqpqnVagl33bbKbI3ODWCvnmjhfwQBVHhjm
           /CMXJ1dUIfcleFHRdH26lWBEm2Z54dYe06EPwJ6zF7LGFRBakF120kY+gUXpnrlfwZi9
           XyFevTI6lvL6+W28b8fxUisGzfL9zmvPb9wHyOpHix5kuvj06Z3FvFhIer03La/Fhd7k
           EWtA==
  MIME-Version: 1.0
  X-Received: by 10.180.20.228 with SMTP id q4mr2165577wie.60.1374938210558;
   Sat, 27 Jul 2013 08:16:50 -0700 (PDT)
  Received: by 10.216.164.9 with HTTP; Sat, 27 Jul 2013 08:16:50 -0700 (PDT)
  In-Reply-To: &lt;15669247.20130725035929.51f0a2a1834095.64964363@mail333.us4.mandrillapp.com&gt;
  References: &lt;15669247.20130725035929.51f0a2a1834095.64964363@mail333.us4.mandrillapp.com&gt;
  Date: Sat, 27 Jul 2013 11:16:50 -0400
  Message-ID: &lt;CAND88j9txyLT7YOqcrSoRYZ9-SDHaCwBsc-ZNR_1+iYPrM0N5w@mail.gmail.com&gt;
  Subject: Re: New message regarding your stay on 2013-06-19 to 2013-06-29 at
   the The Marriot &lt;SRID2&gt;
  From: Taylor Lovett &lt;tlovett88@gmail.com&gt;
  To: Taylor Lovett &lt;reply@guestretain.com&gt;
  Content-Type: multipart/alternative; boundary=f46d04218485a0ea0404e27fbf5b
  X-Nonspam: None
  
  --f46d04218485a0ea0404e27fbf5b
  Content-Type: text/plain; charset=ISO-8859-1
  
  Test email!
  
  --f46d04218485a0ea0404e27fbf5b
  Content-Type: text/html; charset=ISO-8859-1
  </code></pre>