1

I am using Python's IMAPClient in my mail client, and basically I am stuck trying to look up messages by their headers. Specifically, I am trying to find all messages with a given in_reply_to value, which is part of ENVELOPE.

I have tried the following, but none of them works.

server.select_folder(folder_name)
server.search(['ENVELOPE[IN_REPLY_TO]', 'my_target_value'])
#server.search(['ENVELOPE.IN_REPLY_TO', 'my_target_value'])
#server.search(['IN_REPLY_TO', 'my_target_value'])

Any ideas how to do that?

Cédric Julien
  • 78,516
  • 15
  • 127
  • 132
Edgar Navasardyan
  • 4,261
  • 8
  • 58
  • 121

0 Answers0