![]() ![]() "SENTSINCE" SP date / "SMALLER" SP number / "SENTBEFORE" SP date / "SENTON" SP date / "LARGER" SP number / "NOT" SP search-key / "DRAFT" / "HEADER" SP header-fld-name SP astring / "UNANSWERED" / "UNDELETED" / "UNFLAGGED" / "NEW" / "OLD" / "ON" SP date / "RECENT" / "SEEN" / "FROM" SP astring / "KEYWORD" SP flag-keyword / "CC" SP astring / "DELETED" / "FLAGGED" / You can have multiple search-keys of the form search-key = "ALL" / "ANSWERED" / "BCC" SP astring / Below is the complete syntax for what a search key can look like: search = "SEARCH" 1*(SP search-key)īut using imaplib you can leave the encoding as None to get the default. This Polish notation makes the IMAP parser easier to write, at the cost of of making complex queries involving OR difficult to get right. Because of the rule about only two operands, that is implicitly bracketed as if it were OR ( OR tag1 value1 tag2 value2 ) tag3 value3. ![]() Instead you do OR OR tag1 value1 tag2 value2 tag3 value3. You can't do OR tag1 value1 tag2 value2 tag3 value3 because that would mean OR tag1 value1 tag2 value2 tag3 value3. The OR operator doesn't need brackets either, because it takes only two operands. The search function doesn't decode bracketed strings: it is expecting multiple parameters: status, message = arch(None, 'FROM', 'SUBJECT', "Reset Password")ĪND does not need to be specifed because it is the default so brackets are meaningless.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |