B
B
blizzard2019-12-14 19:14:49
Python
blizzard, 2019-12-14 19:14:49

Imaplib, How to set a condition for searching letters by date?

From the input form (pyqt) I get the date

def buttonclicked(self):
        since = self.Since.text()

Then I substitute this date in the search query:
result, data = mail.search(None, '(SINCE {since} )'.format(since=since))

Gives this error
b'[CANNOT] Unsupported search criterion: SINCE 10.05.2019

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dndred, 2019-12-16
@s41blizzard

According to https://tools.ietf.org/html/rfc3501 the date should be in the format 10-05-2019

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question