Interface MailMessageAttributes

  • All Known Implementing Classes:
    SimpleMessageAttributes

    public interface MailMessageAttributes
    Interface for objects holding IMAP4rev1 Message Attributes. Message Attributes should be set when a message enters a mailbox. Implementations are encouraged to implement and store MessageAttributes apart from the underlying message. This allows the Mailbox to respond to questions about very large message without needing to access them directly.

    Note that the message in a mailbox have the same order using either Message Sequence Numbers or UIDs.

    Reference: RFC 2060 - para 2.3

    Version:
    0.1 on 14 Dec 2000
    Author:
    Charles Benett
    • Method Detail

      • getReceivedDate

        Date getReceivedDate()
        Provides the date and time at which the message was received. In the case of delivery by SMTP, this SHOULD be the date and time of final delivery as defined for SMTP. In the case of messages copied from another mailbox, it shuld be the internalDate of the source message. In the case of messages Appended to the mailbox, example drafts, the internalDate is either specified in the Append command or is the current dat and time at the time of the Append.
        Returns:
        Date imap internal date
      • getReceivedDateAsString

        String getReceivedDateAsString()
        Returns IMAP formatted String representation of Date
        Returns:
        the formatted date
      • getSize

        int getSize()
        Provides the sizeof the message in octets.
        Returns:
        int number of octets in message.
      • getEnvelope

        String getEnvelope()
        Provides the Envelope structure information for this message. This is a parsed representation of the rfc-822 envelope information. This is not to be confused with the SMTP envelope!
        Returns:
        String satisfying envelope syntax in rfc 2060.
      • getBodyStructure

        String getBodyStructure​(boolean includeExtensions)
        Provides the Body Structure information for this message. This is a parsed representation of the MIME structure of the message.
        Parameters:
        includeExtensions - true if the body structure extensions should be included
        Returns:
        String satisfying body syntax in rfc 2060.