Package com.icegreen.greenmail.store
Class SimpleMessageAttributes
java.lang.Object
com.icegreen.greenmail.store.SimpleMessageAttributes
- All Implemented Interfaces:
MailMessageAttributes
Attributes of a Message in IMAP4rev1 style. Message
Attributes should be set when a message enters a mailbox.
Note that the message in a mailbox have the same order using either Message Sequence Numbers or UIDs.
reinitialize() must be called on deserialization to reset Logger
Reference: RFC 2060 - para 2.3
- Version:
- 0.2 on 04 Aug 2002
- Author:
- Sascha Kulawik, Charles Benett
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.slf4j.Logger -
Method Summary
Modifier and TypeMethodDescriptiongetBodyStructure(boolean includeExtensions) Provides the Body Structure information for this message.Provides the Envelope structure information for this message.intProvides the current Message Sequence Number for this message.Provides the date and time at which the message was received.Returns IMAP formatted String representation of DateintgetSize()Provides the sizeof the message in octets.intgetUID()Provides the unique identity value for this message.
-
Field Details
-
log
protected final org.slf4j.Logger log -
parts
-
-
Method Details
-
getMessageSequenceNumber
public int getMessageSequenceNumber()Provides the current Message Sequence Number for this message. MSNs change when messages are expunged from the mailbox.- Returns:
- int a positive non-zero integer
-
getUID
public int getUID()Provides the unique identity value for this message. UIDs combined with a UIDValidity value form a unique reference for a message in a given mailbox. UIDs persist across sessions unless the UIDValidity value is incremented. UIDs are not copied if a message is copied to another mailbox.- Returns:
- int a 32-bit value
-
getReceivedDate
Description copied from interface:MailMessageAttributesProvides 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.- Specified by:
getReceivedDatein interfaceMailMessageAttributes- Returns:
- Date imap internal date
-
getReceivedDateAsString
Description copied from interface:MailMessageAttributesReturns IMAP formatted String representation of Date- Specified by:
getReceivedDateAsStringin interfaceMailMessageAttributes- Returns:
- the formatted date
-
getSize
public int getSize()Description copied from interface:MailMessageAttributesProvides the sizeof the message in octets.- Specified by:
getSizein interfaceMailMessageAttributes- Returns:
- int number of octets in message.
-
getEnvelope
Description copied from interface:MailMessageAttributesProvides 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!- Specified by:
getEnvelopein interfaceMailMessageAttributes- Returns:
- String satisfying envelope syntax in rfc 2060.
-
getBodyStructure
Description copied from interface:MailMessageAttributesProvides the Body Structure information for this message. This is a parsed representation of the MIME structure of the message.- Specified by:
getBodyStructurein interfaceMailMessageAttributes- Parameters:
includeExtensions- true if the body structure extensions should be included- Returns:
- String satisfying body syntax in rfc 2060.
-