Mark email as read with exchangelib

2019-04-29 17:13发布

I am using Pythons exchangelib package. How can I mark an e-mail as read with exchangelib?

I have had a look at the official GitHub exchangelib page for my query, but didn't find the answer.

3条回答
仙女界的扛把子
2楼-- · 2019-04-29 17:46

To add to joe's comment, you must also 'save' the item for the flag to be permanent.

item.is_read = True
item.save()
查看更多
仙女界的扛把子
3楼-- · 2019-04-29 17:46

To add to HeroicOlive's comment, if you specifically want to save the is_read value only, try:

item.is_read = True
item.save(update_fields=['is_read'])
查看更多
男人必须洒脱
4楼-- · 2019-04-29 17:51

item.is_read = True should do the trick where item is the message you want to mark read

查看更多
登录 后发表回答