Mark email as read with exchangelib

女生的网名这么多〃 提交于 2019-12-22 05:37:19

问题


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.


回答1:


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

item.is_read = True
item.save()



回答2:


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'])



回答3:


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



来源:https://stackoverflow.com/questions/45037322/mark-email-as-read-with-exchangelib

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!