A
A
Alexander2018-05-21 14:58:11
Python
Alexander, 2018-05-21 14:58:11

How to know if a letter has been read or not (imap)?

M = imaplib.IMAP4_SSL("imap.gmail.com", 993)
M.login(...)
M.select('Inbox', readonly=True)
rv, data = M.search(None, "All")
        for num in data[0].split():
            box = {}
            typ, msg_data = .M.fetch(num, '(RFC822)')
            raw_email = msg_data[0][1]
            raw_email_string = raw_email.decode('utf-8')
            # converts byte literal to string re    moving b''
            email_message = email.message_from_string(raw_email_string)
           ...

How do I know if a message has been read or not?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dimonchik, 2018-05-21
@kentuck1213

https://stackoverflow.com/questions/22856198/how-t...

M
McBernar, 2018-05-21
@McBernar

Put a transparent pixel in the letter and see if someone has accessed this pixel.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question