Messages with unique identifiers corresponding to the specified unique identifier set. Messages that contain the specified string in the envelope structure's TO field. Messages that contain the specified string in the header or body of the message. Messages that contain the specified string in the envelope structure's SUBJECT field. Messages with an size smaller than the specified number of octets. Messages whose internal date (disregarding time and timezone) is within or later than the specified date. Messages whose Date: header (disregarding time and timezone) is within or later than the specified date. Messages whose Date: header (disregarding time and timezone) is within the specified date. Messages whose Date: header (disregarding time and timezone) is earlier than the specified date. Messages whose internal date (disregarding time and timezone) is within the specified date. This is functionally equivalent to "NOT RECENT" (as opposed to "NOT NEW"). Messages that do not have the \Recent flag set.
Messages that do not match the specified search key. This is functionally equivalent to "(RECENT UNSEEN)".
Messages that have the \Recent flag set but not the \Seen flag. Messages with an size larger than the specified number of octets. Messages with the specified keyword flag set. If the string to search is zero-length, this matches all messages that have a header line with the specified field-name regardless of the contents. Messages that have a header with the specified field-name (as defined in ) and that contains the specified string in the text of the header (what comes after the colon). Messages that contain the specified string in the envelope structure's FROM field. Messages that contain the specified string in the envelope structure's CC field. Messages that contain the specified string in the body of the message. Messages whose internal date (disregarding time and timezone) is earlier than the specified date. Messages that contain the specified string in the envelope structure's BCC field. When used in a range, sets higher boundary of the range to the index of the last message in the folder.Īll messages in the folder the default initial key for ANDing. For instance, "1:10" designates message indices in the range from 1 to 10. Multiple values are delimited with commas (,). The entire list of the currently defined IMAP4 search keys:Ĭorresponding to the specified message sequence number set. This is true for all IMAP keys which search for text (such as BODY, CC, FROM, SUBJECT, TEXT, TO). Or, when searching for non-English text, set charset to "UTF-8" and instead of ToQuotedString(String) use ToUtf8QuotedString(String) When passing strings to search query, you should use the syntax like "TEXT " + ImapUtils.ToQuotedString(textToSearch) to enclose the text string in quotes. A search key can also be a parenthesized list of one or more search keys (e.g., for use with the OR and NOT keys).ĪllOf( String ) (AND), AnyOf( String ) (OR), Not(String) (NOT) methods simplify building complex queries. The criteria DELETED FROM "SMITH" SINCE refers to all deleted messages from Smith that were placed in the folder When multiple keys are specified, the result is the intersection (AND function) of all the messages that match those keys. MailBee simply passes this value to the server without alteration. If searchCondition is specified, it must strictly match search expression rules defined by the IMAP4 protocol (RFC3501). Or to MessageNumberCollection (if returnUids was false). Public static boolean sendMessage(String email, String subject, String text) * 1.13 */ protected Insert( userId. developer must type-cast returned value to UidCollection type (if returnUids was true)