Python Outlook getting all emails from Sender

前端 未结 1 549
感情败类
感情败类 2021-01-01 06:22

I am trying to use python to go through outlook and get all emails by a sender. I have looked but can\'t find out how to do this. I can get an email by subject and return th

相关标签:
1条回答
  • 2021-01-01 07:00

    It looks like you're looking for the SenderEmailAddress property.

    You could go through your messages for a particular sender via:

    for m in messages:
       if m.SenderEmailAddress == 'some_sender@somewhere.com':
           print(m)
    
    0 讨论(0)
提交回复
热议问题