Example #1
0
 /**
  * @param string $sFolderFullNameRaw
  *
  * @return \MailSo\Mail\MailClient
  *
  * @throws \MailSo\Base\Exceptions\InvalidArgumentException
  */
 public function FolderClear($sFolderFullNameRaw)
 {
     $this->oImapClient->FolderSelect($sFolderFullNameRaw);
     $oFolderInformation = $this->oImapClient->FolderCurrentInformation();
     if ($oFolderInformation && 0 < $oFolderInformation->Exists) {
         $this->oImapClient->MessageStoreFlag('1:*', false, array(\MailSo\Imap\Enumerations\MessageFlag::DELETED), \MailSo\Imap\Enumerations\StoreAction::ADD_FLAGS_SILENT);
         $this->oImapClient->MessageExpunge();
     }
     return $this;
 }