imaplib.IMAP4.error: SEARCH command error: BAD [b’The specified message set is invalid.’] , not able search with multiple filter’s
mail.select(“INBOX”) result, messages = mail.search(None, ‘(AND (“UNSEEN”) (“SUBJECT” “important”) (“FROM” “[email protected]”))’) When I use OR instead of AND it works fine but when I change it I get this error: imaplib.IMAP4.error: SEARCH command error: BAD [b’The specified message set is invalid.’] How can I filter muliple fields, like when there are multiple mailIds to filter? […]
imaplib.IMAP4.error: SEARCH command error: BAD [b’The specified message set is invalid.’] , not able search with multiple filter’s
mail.select(“INBOX”) result, messages = mail.search(None, ‘(AND (“UNSEEN”) (“SUBJECT” “important”) (“FROM” “[email protected]”))’) When I use OR instead of AND it works fine but when I change it I get this error: imaplib.IMAP4.error: SEARCH command error: BAD [b’The specified message set is invalid.’] How can I filter muliple fields, like when there are multiple mailIds to filter? […]