title: Extract sender's email address from Outlook Exchange in Python using win32
body: <p>I am trying to extract the sender's email address from outlook 2013 using win32 package in python. There are two kinds of email address type in my Inbox, exchange and smtp. If I try to print the the sender's email address of Exchange type, I am getting this: </p>
  
  <pre><code>/O=EXCHANGELABS/OU=EXCHANGE ADMINISTRATIVE GROUP(FYDIBOHF23SPDLT)/CN=RECIPIENTS/CN=6F467C825619482293F429C0BDE6F1DB-
  </code></pre>
  
  <p>I have already gone through this <a href="https://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.mailitem_properties.aspx" rel="noreferrer">link</a> but couldn't find a function through which I can extract the smtp address. </p>
  
  <p>Below is my code:</p>
  
  <pre><code>from win32com.client import Dispatch
  outlook = Dispatch("Outlook.Application").GetNamespace("MAPI")
  inbox = outlook.GetDefaultFolder("6")
  all_inbox = inbox.Items
  folders = inbox.Folders
  for msg in all_inbox:
     print msg.SenderEmailAddress  
  </code></pre>
  
  <p>Currently all the Email Address are coming like this:</p>
  
  <pre><code>/O=EXCHANGELABS/OU=EXCHANGE ADMINISTRATIVE GROUP(FYDIBOHF23SPDLT)/CN=RECIPIENTS/CN=6F467C825619482293F429C0BDE6F1DB-
  </code></pre>
  
  <p>I found a solution to this in VB.net <a href="https://stackoverflow.com/questions/22193757/how-do-i-get-the-real-email-address-with-exchange-web-services">link</a> but don't know how to rewrite the same thing in Python. </p>