I'm trying to get certain emails with HEADER values.
When I try with a Subject HEADER, it works properly.
res, tmp = self.mail.uid('search', None, 'HEADER Subject "Some Subject"')
But when I try with a Date HEADER, it returns an empty list.
res, tmp = self.mail.uid('search', None, 'HEADER Date "Wed, 29 Apr 2020 19:00:22 +0900 (KST)"')
Those HEADER value strings are just copied from message['Subject'] and message['Date'].
When I print the code below:
print(message['Date'] == 'Wed, 29 Apr 2020 19:00:22 +0900 (KST)')
"True" is printed.
What could be wrong in my code?