<?php require_once dirname(__FILE__) . '/imap_include.inc'; $stream_id = setup_test_mailbox('', 1); imap_delete($stream_id, 1); var_dump(imap_undelete($stream_id, 1)); imap_close($stream_id); require_once 'clean.inc';
/** * message_undelete() * UnDelete a message */ function message_undelete($msgno) { if ($this->connection == 0) { return false; } imap_undelete($this->connection, $msgno); // TODO: Error checking. return true; }
public function expungeMessages($imap) { print_r(imap_undelete($imap)); }
<?php echo "Checking with no parameters\n"; imap_undelete(); echo "Checking with incorrect parameter type\n"; imap_undelete(''); imap_undelete(false); require_once dirname(__FILE__) . '/imap_include.inc'; $stream_id = imap_open($default_mailbox, $username, $password) or die("Cannot connect to mailbox {$default_mailbox}: " . imap_last_error()); imap_undelete($stream_id); imap_close($stream_id);
/** * UnDelete a note by ID (that has been marked as deleted) * * @param int $ID_Num The note's ID number. * * @return void <u>Description:</u><br>This method deletes a note by ID. It is designed to undelete notes that are marked as deleted but are still in the icloud.<u>Warning:</u><br> Setting $Expunge to TRUE will destroy any chance of recovering accidentally deleted notes. */ function UnDelete_Note_By_ID($ID_Num) { imap_undelete($this->imap, $ID_Num); }
/** * unmark message for deletion * allows removing messages from * the delete state */ public function undelete() { $this->set_mark_delete(FALSE); imap_undelete($this->peek_parent->resource, $this->Msgno); $this->log_state('Undeleted message #' . $this->Msgno); }
/** * Proxy method for MailFolder: Undelete a message * * @param peer.mail.MailFolder f * @param peer.mail.Message msg * @return bool success */ public function undeleteMessage($f, $msg) { if (FALSE === imap_undelete($this->_hdl[0], $msg->uid, FT_UID)) { trigger_error('UID: ' . $msg->uid, E_USER_NOTICE); throw new MessagingException('Removing \\Deleted-flag for message failed', $this->_errors()); } $msg->flags |= ~MAIL_FLAG_DELETED; return TRUE; }
function unDeleteMsg() { imap_undelete($this->mbox, $this->mailid); }