A
A
Artem2016-08-17 17:21:33
Python
Artem, 2016-08-17 17:21:33

How to get all emails after the email with a specific Message-ID?

Good day!
There is a small client in Python that accepts mail via IMAP.
It is necessary that it receive all letters that were received after the letter with a certain Message-ID.
For example:

Дата получения | Тема письма | message-id
01-01-2000     | Hello world | [email protected]
31-12-1999     | New Year!   | [email protected]
30-12-1999     | welcome to..| [email protected]  <<< этот message-id известен заранее
20-12-1999     | first email | [email protected]

Knowing the Message-ID: [email protected]eoc, you need to get only two letters - "Hello world" and "New Year".
On StackOverflow, I only found a search by UID, but this does not suit me - the UID can change.
Please help with a line of code.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question