com.jscape.inet.imap

## Class ImapMessage

- java.lang.Object
- - com.jscape.inet.imap.ImapMessage

- All Implemented Interfaces:
    java.io.Serializable

      public class ImapMessage
      extends java.lang.Object
      implements java.io.Serializable

  Represents an email message retrieved from an IMAP server containing additional information such as message flags and message id.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ImapMessage(EmailMessage message, int id, java.lang.String flags)` Constructs a new ImapMessage instance

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getId()` Gets current message id
    `EmailMessage` | `getMessage()` Gets email message for this message
    `boolean` | `isAnswered()` Gets if message has been answered.
    `boolean` | `isDeleted()` Gets if message is deleted
    `boolean` | `isDraft()` Gets if message is in a draft.
    `boolean` | `isRecent()` Gets if message is recent.
    `boolean` | `isSeen()` Gets if message has been seen (read).

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ImapMessage

          public ImapMessage(EmailMessage message,
                             int id,
                             java.lang.String flags)

      Constructs a new ImapMessage instance
      Parameters:
        `message` - the message
        `id` - the message id
        `flags` - the message flags response from IMAP server in response to FETCH id FLAGS command

  - ### Method Detail

    - #### isSeen

          public boolean isSeen()

      Gets if message has been seen (read).
      Returns:
        true if seen (read), false otherwise

    - #### isRecent

          public boolean isRecent()

      Gets if message is recent.
      Returns:
        true if recent, false otherwise

    - #### isDraft

          public boolean isDraft()

      Gets if message is in a draft.
      Returns:
        true if draft, false otherwise

    - #### isDeleted

          public boolean isDeleted()

      Gets if message is deleted
      Returns:
        true if deleted, false otherwise

    - #### isAnswered

          public boolean isAnswered()

      Gets if message has been answered.
      Returns:
        true if answered, false otherwise

    - #### getMessage

          public EmailMessage getMessage()

      Gets email message for this message
      Returns:
        an EmailMessage instance
      See Also:
        `EmailMessage`

    - #### getId

          public int getId()

      Gets current message id
      Returns:
        the message id

Copyright © JSCAPE LLC. 1999-2021. All Rights Reserved