Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mark email as read with exchangelib

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.

like image 216
Amit Bhat Avatar asked Jul 11 '17 14:07

Amit Bhat


2 Answers

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'])
like image 94
Ruan Avatar answered Nov 12 '22 23:11

Ruan


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

item.is_read = True
item.save()
like image 13
HeroicOlive Avatar answered Nov 12 '22 23:11

HeroicOlive