com.aspose.email

Interfaces

Classes

Enums

Exceptions

com.aspose.email

Class ImapQueryBuilder



  • public final class ImapQueryBuilder
    extends MailQueryBuilder

    Represents the builder of search expression that used by IMAP protocol.

    • Constructor Detail

      • ImapQueryBuilder

        public ImapQueryBuilder(Charset defaultEncoding)

        Initializes a new instance of the ImapQueryBuilder class.

        Parameters:
        defaultEncoding - Contains default encoding (charset) for query builder.
      • ImapQueryBuilder

        public ImapQueryBuilder()

        Initializes a new instance of the ImapQueryBuilder class.

    • Method Detail

      • getESearchParameters

        public final ESearchOptions getESearchParameters()

        Gets or sets ESEARCH Parameters This method works only if server supports ESEARCH extension. Please, read more https://tools.ietf.org/html/rfc4315

      • setESearchParameters

        public final void setESearchParameters(ESearchOptions value)

        Gets or sets ESEARCH Parameters This method works only if server supports ESEARCH extension. Please, read more https://tools.ietf.org/html/rfc4315

      • hasFlags

        public final MailQuery hasFlags(ImapMessageFlags flags)

        Search messages with the specified flags.

        Parameters:
        flags - The flags.
        Returns:
        MailQuery that represents search query (one searching criteria).
      • hasNoFlags

        public final MailQuery hasNoFlags(ImapMessageFlags flags)

        Search messages with the unspecified flags.

        Parameters:
        flags - The flags.
        Returns:
        MailQuery that represents search query (one searching criteria).
      • hasHeader

        public final MailQuery hasHeader(String fieldName,
                          String fieldValue)

        Search messages that have a header with the specified field-name and that contains the specified string in the text of the header (what comes after the colon). 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.

        Parameters:
        fieldName - Name of the field.
        fieldValue - The field value.
        Returns:
        MailQuery that represents search query (one searching criteria).