title: Trouble when deleting emails from Outlook with Python
body: <p>When using a generator to iterate through emails in Outlook i am having some trouble deleting them. If i call delete on the message the generator will "jump" over the next item so it will only process half of the emails in my Inbox.</p>
  
  <pre><code>for message in scanner.scan_emails():
              message.Delete()
              deleted_counter += 1
  </code></pre>
  
  <p>As a workaround i save all the messages in a list then loop through them:
      for message in emails_to_delete_list:
              message.Delete()</p>
  
  <p>Is there a better way of doing this ?</p>