array('delim' => .., 'flags' => ..)) * @throws RuntimeException */ public function folders($reference = '', $folder = '*'); /** * Set message flags * * @param array $flags flags to set, add or remove * @param int $from message for items or start message if $to !== null * @param int|null $to if null only one message ($from) is fetched, else it's the * last message, INF means last message available * @param string|null $mode '+' to add flags, '-' to remove flags, everything else sets the flags as given * @param bool $silent if false the return values are the new flags for the wanted messages * @param bool $uid set to true if passing a unique id * * @return bool|array new flags if $silent is false, else true or false depending on success * @throws RuntimeException */ public function store(array $flags, $from, $to = null, $mode = null, $silent = true, $uid = false); /** * Append a new message to given folder * * @param string $folder name of target folder * @param string $message full message content * @param array $flags flags for new message * @param string $date date for new message * @return bool success * @throws RuntimeException */ public function appendMessage($folder, $message, $flags = null, $date = null); /** * Copy message set from current folder to other folder * * @param string $folder destination folder * @param $from * @param int|null $to if null only one message ($from) is fetched, else it's the * last message, INF means last message available * @param bool $uid set to true if passing a unique id * * @return bool success * @throws RuntimeException */ public function copyMessage($folder, $from, $to = null, $uid = false); /** * Copy multiple messages to the target folder * * @param array $messages List of message identifiers * @param string $folder Destination folder * @param bool $uid Set to true if you pass message unique identifiers instead of numbers * @return array|bool Tokens if operation successful, false if an error occurred * * @throws RuntimeException */ public function copyManyMessages($messages, $folder, $uid = false); /** * Move a message set from current folder to an other folder * @param string $folder destination folder * @param $from * @param int|null $to if null only one message ($from) is fetched, else it's the * last message, INF means last message available * @param bool $uid set to true if passing a unique id * * @return bool success */ public function moveMessage($folder, $from, $to = null, $uid = false); /** * Move multiple messages to the target folder * * @param array $messages List of message identifiers * @param string $folder Destination folder * @param bool $uid Set to true if you pass message unique identifiers instead of numbers * @return array|bool Tokens if operation successful, false if an error occurred * * @throws RuntimeException */ public function moveManyMessages($messages, $folder, $uid = false); /** * Create a new folder * * @param string $folder folder name * @return bool success * @throws RuntimeException */ public function createFolder($folder); /** * Rename an existing folder * * @param string $old old name * @param string $new new name * @return bool success * @throws RuntimeException */ public function renameFolder($old, $new); /** * Delete a folder * * @param string $folder folder name * @return bool success * @throws RuntimeException */ public function deleteFolder($folder); /** * Subscribe to a folder * * @param string $folder folder name * @return bool success * @throws RuntimeException */ public function subscribeFolder($folder); /** * Unsubscribe from a folder * @param string $folder folder name * * @return bool success * @throws RuntimeException */ public function unsubscribeFolder($folder); /** * Send idle command * * @throws RuntimeException */ public function idle(); /** * Send done command * @throws RuntimeException */ public function done(); /** * Apply session saved changes to the server * * @return bool success * @throws RuntimeException */ public function expunge(); /** * Retrieve the quota level settings, and usage statics per mailbox * @param $username * * @return array * @throws RuntimeException */ public function getQuota($username); /** * Retrieve the quota settings per user * * @param string $quota_root * * @return array * @throws ConnectionFailedException */ public function getQuotaRoot($quota_root = 'INBOX'); /** * Send noop command * * @return bool success * @throws RuntimeException */ public function noop(); /** * Do a search request * * @param array $params * @param bool $uid set to true if passing a unique id * * @return array message ids * @throws RuntimeException */ public function search(array $params, $uid = false); /** * Get a message overview * @param string $sequence uid sequence * @param bool $uid set to true if passing a unique id * * @return array * @throws RuntimeException * @throws MessageNotFoundException * @throws InvalidMessageDateException */ public function overview($sequence, $uid = false); /** * Enable the debug mode */ public function enableDebug(); /** * Disable the debug mode */ public function disableDebug(); }