Class | Larch::IMAP::Mailbox |
In: |
lib/larch/imap/mailbox.rb
|
Parent: | Object |
Represents an IMAP mailbox.
attr | [R] | |
db_mailbox | [R] | |
delim | [R] | |
flags | [R] | |
imap | [R] | |
name | [R] | |
perm_flags | [R] | |
state | [R] | |
subscribed | [R] |
Appends the specified Larch::IMAP::Message to this mailbox if it doesn‘t already exist. Returns true if the message was appended successfully, false if the message already exists in the mailbox.
Deletes the message in this mailbox with the specified guid. Returns true on success, false on failure.
Iterates through messages in this mailbox, yielding a Larch::Database::Message object for each to the provided block.
Iterates through messages in this mailbox, yielding the Larch message guid of each to the provided block.
Iterates through mailboxes that are first-level children of this mailbox, yielding a Larch::IMAP::Mailbox object for each to the provided block.
Returns a Larch::IMAP::Message struct representing the message with the specified Larch guid, or nil if the specified guid was not found in this mailbox.
Returns a Larch::Database::Message object representing the message with the specified Larch guid, or nil if the specified guide was not found in this mailbox.
Returns true if a message with the specified Larch guid exists in this mailbox, false otherwise.
Returns an Array of Larch::IMAP::Mailbox objects representing mailboxes that are first-level children of this mailbox.
Sets the IMAP flags for the message specified by guid. flags should be an array of symbols for standard flags, strings for custom flags.
If merge is true, the specified flags will be merged with the message‘s existing flags. Otherwise, all existing flags will be cleared and replaced with the specified flags.
Note that the :Recent flag cannot be manually set or removed.
Returns true on success, false on failure.