0

This is a test I did with IMAP on outlook.com connecting through OAuth2

# THIS IS CORRECT
ipdb> mail.criterion = '(FROM "ship-confirm@amazon.com")'
ipdb> mail.get_headers()
[('"Inbox"', [<mailengine.scrubber.IMAPScrubber object at 0x110c21650>, <mailengine.scrubber.IMAPScrubber object at 0x110c21290>, <mailengine.scrubber.IMAPScrubber object at 0x110c1f6d0>, <mailengine.scrubber.IMAPScrubber object at 0x110c1f950>, <mailengine.scrubber.IMAPScrubber object at 0x110c1f750>])]

 # THIS IS INCORRECT (we should have 3 emails)
ipdb> mail.criterion = '(NOT FROM "ship-confirm@amazon.com")'
ipdb> mail.get_headers()
[]

# TEST (correctly getting all emails)
ipdb> mail.criterion = '(NOT FROM "anyword")'
ipdb> mail.get_headers()
[('"Inbox"', [<mailengine.scrubber.IMAPScrubber object at 0x110c21290>, <mailengine.scrubber.IMAPScrubber object at 0x110c1f950>, <mailengine.scrubber.IMAPScrubber object at 0x110c1f850>, <mailengine.scrubber.IMAPScrubber object at 0x110c1f690>, <mailengine.scrubber.IMAPScrubber object at 0x110c1f6d0>, <mailengine.scrubber.IMAPScrubber object at 0x110c1f750>, <mailengine.scrubber.IMAPScrubber object at 0x110c1f810>, <mailengine.scrubber.IMAPScrubber object at 0x110c1f1d0>])]

# TEST (incorrectly getting 0 emails)
ipdb> mail.criterion = '(NOT FROM "anyword@gmail.com")'
ipdb> mail.get_headers()
[]

My (not so wild) guess is that the @ symbol is breaking the the NOT FROM search. Maybe I should scape it? horrible bug?

Hassek
  • 8,715
  • 6
  • 47
  • 59
  • What is the specific and precise name and version of the Outlook-like thing you're trying to access? There are lots of them, and MS *just* renamed a few. Keep in mind also that the thing being run is probably *Exchange*, not Outlook. Outlook is just the frontend. Also, please remember that tags stand alone. You can't combine `[office]` and `[live]` to talk about a product that might be named "Office Live" – Charles Feb 13 '14 at 21:19
  • Alright fair enough, to tell you the truth I am not very familiar with windows technology, this is the new outlook web version (outlook.com) and the way I connect is by creating an account through `live connect`. Now, since `windows live` exists, I see `live connect` and is just not clear to me if those are different technologies or not. Definitely leaving this tags is not enough since it will be confused with the `outlook desktop` versions. – Hassek Feb 13 '14 at 23:08

0 Answers0