title: Python win32com : Reading multiple Outlook inbox
body: <p>I want to get the SenderEmailAddress of all email sent on two specified mail addresses : 123@abc.com and 456@def.com that are in my Outlook Application on my computer, the point is to make a list of all mail senders that will be kept in a csv file.</p>
  
  <p>The architectures of these mailboxes are this way : </p>
  
  <p>123@abc.com</p>
  
  <ul>
  <li>-> Inbox</li>
  </ul>
  
  <p>&amp;</p>
  
  <p>456@def.com</p>
  
  <ul>
  <li>-> Inbox</li>
  </ul>
  
  <p>I would like to read the Inbox Folders from the two mailboxes and store the SenderEmailAddress from the two Folders</p>
  
  <pre><code>outlook = win32com.client.Dispatch("Outlook.Application").GetNamespace("MAPI")
  inbox = outlook.GetDefaultFolder(6)
  </code></pre>
  
  <p>I've found that for some people it works to use </p>
  
  <pre><code>inbox = outlook.GetDefaultFolder(6).Folders[1] # To access 123@abc.com Inbox
  inbox = outlook.GetDefaultFolder(6).Folders[2] # To access 456@def.com Inbox
  </code></pre>
  
  <p>But in my case it just gets me inside of the two subfolders that are inside of Inbox and nothing more, I don't have the possibility to access at all to the second mailbox.
  I have the possibility to detect these Mailboxes by using </p>
  
  <pre><code>for folder in outlook.Folders: 
      print(folder.Name)
  </code></pre>
  
  <p>I have no idea how to fix this and finally access to my second mail address, if anyone would be capable to help me on this it would be great. </p>
  
  <p>Thanks !</p>