Amit Bhat
Amit Bhat

Reputation: 93

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.

Upvotes: 9

Views: 3880

Answers (3)

Ruan
Ruan

Reputation: 123

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

Upvotes: 6

HeroicOlive
HeroicOlive

Reputation: 300

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

item.is_read = True
item.save()

Upvotes: 14

joe
joe

Reputation: 21

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

Upvotes: 2

Related Questions