Package jakarta.mail.search


package jakarta.mail.search

Message search terms for the Jakarta Mail API. This package defines classes that can be used to construct a search expression to search a folder for messages matching the expression; see the search method on jakarta.mail.Folder. See SearchTerm.

Note that the exact search capabilities depend on the protocol, provider, and server in use. For the POP3 protocol, all searching is done on the client side using the Jakarta Mail classes. For IMAP, all searching is done on the server side and is limited by the search capabilities of the IMAP protocol and the IMAP server being used. For example, IMAP date based searches have only day granularity.

In general, all of the string patterns supported by search terms are just simple strings; no regular expressions are supported.

  • Class
    Description
    This abstract class implements string comparisons for Message addresses.
    This class implements Message Address comparisons.
    This class implements the logical AND operator on individual SearchTerms.
    This class implements searches on a message body.
    This class models the comparison operator.
    This class implements comparisons for Dates
    This class implements comparisons for Message Flags.
    This class implements string comparisons for the From Address header.
    This class implements comparisons for the From Address header.
    This class implements comparisons for Message headers.
    This class implements comparisons for integers.
    This term models the RFC822 "MessageId" - a message-id for Internet messages that is supposed to be unique per message.
    This class implements comparisons for Message numbers.
    This class implements the logical NEGATION operator.
    This class implements the logical OR operator on individual SearchTerms.
    This class implements comparisons for the Message Received date
    This class implements string comparisons for the Recipient Address headers.
    This class implements comparisons for the Recipient Address headers.
    The exception thrown when a Search expression could not be handled.
    Search criteria are expressed as a tree of search-terms, forming a parse-tree for the search expression.
    This class implements comparisons for the Message SentDate.
    This class implements comparisons for Message sizes.
    This class implements the match method for Strings.
    This class implements comparisons for the message Subject header.