Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

Commit

Permalink
implement imap-cancel
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Rauscher committed Jun 5, 2014
1 parent dd933a9 commit d6128d6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion classes/connection/messagestream/imap.class.php
Expand Up @@ -55,7 +55,8 @@ public function open($auth) {
}

public function close() {
$this->imapclient->disconnect();
// Expunge on disconnect
$this->imapclient->disconnect(true);
}

private function getArticleNr($msgid) {
Expand Down Expand Up @@ -116,6 +117,11 @@ protected function getRFC5322Message($msgid) {
* Schreibe eine Nachricht
**/

public function postCancel($cancel, $message) {
// Nachricht wird zum löschen markiert. Löschen erst bei Disconnect (sonst muss die Nummerierung geändert werden)
$this->imapclient->deleteMessages($this->getArticleNr($message->getMessageID()));
}

public function post($message) {
if ($this->writer != false) {
return $this->writer->post($message);
Expand Down

0 comments on commit d6128d6

Please sign in to comment.