Skip to content

Commit

Permalink
Added expunge to remove all emails flagged for deletion on the inbox.
Browse files Browse the repository at this point in the history
  • Loading branch information
benhall14 committed Mar 14, 2023
1 parent 5b5a47e commit d01afc7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/phpImapReader/Reader.php
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,16 @@ public function deleteEmail($email_id)
return imap_delete($this->stream(), $email_id, FT_UID);
}

/**
* Expunge all emails that are marked for deletion on the connected inbox.
*
* @return boolean
*/
public function expunge()
{
return imap_expunge($this->stream());
}

/**
* Mark an email as read by given email id.
*
Expand Down

0 comments on commit d01afc7

Please sign in to comment.