mark a message as read by object_id
See original GitHub issueHi,
is it possible to mark a message as read by the messages ID?
I have obtained the ID as the below but am unable to use it to mark a message as read it seems?
message obtained by message.object_id
account = Account((credentials.username, credentials.password))
mailbox = account.mailbox()
query = mailbox.new_query().on_attribute('id').contains(message_id)
messages = mailbox.get_messages(limit=1, query=query)
...| Error Message: The property 'Id' does not support filtering.
I assumed I would filter the mailbox then mark that message as read, is there another way?
Issue Analytics
- State:
- Created 5 years ago
- Comments:13 (10 by maintainers)
Top Results From Across the Web
ObjectId — MongoDB Manual
Returns a new ObjectId value. The 12-byte ObjectId value consists of: a 4-byte timestamp value, representing the ObjectId's creation, measured in seconds since ......
Read more >MongoDB / NOSQL: Best approach to handling read/unread ...
Suppose you have a large number of users (M) and a large number of documents (N) and you want each user to be...
Read more >What Is Objectid in Mongodb and How to Generate It Manually
Learn from what is ObjectId and its importance, generating a new ObjectId manually to methods available over Object Id and how to use...
Read more >Search by ObjectId in mongodb with PyMongo - Python
Read ; Discuss; Courses; Practice; Video ... ObjectId is the default primary key for MongoDB documents and is usually found in “_id” field....
Read more >Can´t read from Azure Cosmos DB (because ObjectId?)?
I have also hit my head on this issue using the Azure CosmosDb MongoDb API, finally found a workaround which so far is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Latest Solution Working 25/11/22
If you already have a message object like from
.get_messages(limit=1000)
and you want to only download attachment’s for certain messages and not all for speed or whatever reason you might have the best solution in that case is using the above code to get attachment, as follows,I hope you understand.
Hi.
I found other way to patch the message. After investigating further MS Graph I found there are 4 endpoints for patching the message: https://github.com/microsoftgraph/microsoft-graph-docs/blob/main/api-reference/beta/api/message-update.md#http-request. For me this one worked:
PATCH /users/{id | userPrincipalName}/mailFolders/{id}/messages/{id}
. So at the end I ended up usingrequests
module and send PATCH request to the MS Graph. Something like: