public function undelete(): void
    {
        // 'deleted' header changed, force to reload headers, would be better to set deleted flag to false on header
        $this->clearHeaders();
        if (!\imap_undelete($this->resource->getStream(), $this->getNumber(), \FT_UID)) {
            throw new MessageUndeleteException(\sprintf('Message "%s" cannot be undeleted', $this->getNumber()));
        }
    }
public function undelete(): void
    {
        // 'deleted' header changed, force to reload headers, would be better to set deleted flag to false on header
        $this->clearHeaders();
        if (!\imap_undelete($this->resource->getStream(), $this->getNumber(), \FT_UID)) {
            throw new MessageUndeleteException(\sprintf('Message "%s" cannot be undeleted', $this->getNumber()));
        }
    }
public function undelete ( ) : void { // 'deleted' header changed, force to reload headers, would be better to set deleted flag to false on header $ this -> clearHeaders ( ) ; if ( ! \ imap_undelete ( $ this -> resource -> getStream ( ) , $ this -> getNumber ( ) , \ FT_UID ) ) { throw new MessageUndeleteException ( \ sprintf ( 'Message "%s" cannot be undeleted' , $ this -> getNumber ( ) ) ) ; } }
Undelete message.

@throws MessageUndeleteException
Undelete message .