| Net-IMAP-Server documentation | view source | Contained in the Net-IMAP-Server distribution. |
Net::IMAP::Server::Message - Represents a message stored in a user's mailbox
Creates a new message, from an RFC2822 string.
Gets or sets the Net::IMAP::Server::Mailbox that this message is in.
Gets or sets the sequence number of this message in its mailbox. Note, however, that due to the semi-transactional nature of IMAP, different connections may see a message as having different sequence numbers! The sequence number stored on the message is the sequence number that a new connection would see; to find out what a connection believes the sequence number of a message to be, use sequence in Net::IMAP::Server::Connection.
Gets or sets the UID of the message. This, paired with the name and UIDVALIDITY of its mailbox, is a unique designator of the message.
Gets or sets the string representing when the message was received by
the server. According to RFC specification, this must be formatted as
01-Jan-2008 15:42:00 -0500 if it is a STRING.
Returns the epoch time of the internaldate, ignoring times and
time zones. This is almost certainly only useful for SEARCH BEFORE
and friends.
Returns the Date header of the message, as a DateTime object. Returns undef if the date cannot be parsed.
Similar to epoch_day_utc, but for the date header. That is, it returns the Date header, having stripped off the timezone and time. Returns undef if the Date header cannot be parsed.
Marks the message as expunged -- this is called by expunge in Net::IMAP::Server::Mailbox, which deals with actually removing the message from the appropriate places..
Returns true if the message has been marked as "to be expunged" by expunge.
Returns true if copying this message to the given
Net::IMAP::Server::Mailbox MAILBOX is allowed. By default,
always returns true;
Copies the message into the given Net::IMAP::Server::Mailbox
MAILBOX, and returns the new message.
Returns the names of flags that are stored per-session. Defaults to
only the \Recent flag.
Sets the given flag on the message; if a true value is passed for
SILENT, mailboxes will not send notification of the change to the
client. Returns the old value.
Clears the given flag on the message; if a true value is passed for
SILENT, mailboxes will not send notification of the change to the
client. Returns the old value.
Returns true if the message has the given flag set.
Returns the list of flags which are set on the message.
Sets the given FLAGS, which should be an array reference, on the
message. STRING should be +FLAGS, -FLAGS, or FLAGS; the
first sets the set of flags, the second unsets the set of flags, and
the third changes the message's flags to exactly match the given set.
Returns the Email::Simple::Header of the message.
Gets or sets the Email::MIME object for this message.
Takes SPEC, which is either a string or an array reference of
strings, and returns a list of strings or data structures which match
the specification. The specification is defined by section 7.4.2 of
RFC 3501.
This method is generally only used internally by fetch.
SECTIONS should be an array reference of indexes into MIME parts,
or pulled from the set of strings: HEADER, MIME, FIELDS,
TEXT. START and END determine which bytes of the resulting
content to send. EXTRA is used only for FIELDS, and supplies
the names of headers to fetch.
Returns a string describing the MIME body structure of the message.
Returns a data structure defining the email addresses listed in the
given HEADER. This is used internally by mime_envelope.
Returns a data structure defining properties of significant header fields. This is used internally by fetch.
Called by the mailbox before the message is torn down; breaks down any circular references.
| Net-IMAP-Server documentation | view source | Contained in the Net-IMAP-Server distribution. |