public function AjaxMessageCopy() { $sFromFolderFullNameRaw = (string) $this->getParamValue('Folder', ''); $sToFolderFullNameRaw = (string) $this->getParamValue('ToFolder', ''); $aUids = \ProjectCore\Base\Utils::ExplodeIntUids((string) $this->getParamValue('Uids', '')); if (0 === strlen(trim($sFromFolderFullNameRaw)) || 0 === strlen(trim($sToFolderFullNameRaw)) || !is_array($aUids) || 0 === count($aUids)) { throw new \ProjectCore\Exceptions\ClientException(\ProjectCore\Notifications::InvalidInputParameter); } $oAccount = $this->getAccountFromParam(); try { $this->oApiMail->copyMessage($oAccount, $sFromFolderFullNameRaw, $sToFolderFullNameRaw, $aUids); } catch (\MailSo\Imap\Exceptions\NegativeResponseException $oException) { $oResponse = $oException->GetLastResponse(); throw new \ProjectCore\Exceptions\ClientException(\ProjectCore\Notifications::CanNotCopyMessageQuota, $oException, $oResponse instanceof \MailSo\Imap\Response ? $oResponse->Tag . ' ' . $oResponse->StatusOrIndex . ' ' . $oResponse->HumanReadable : ''); } catch (\Exception $oException) { throw new \ProjectCore\Exceptions\ClientException(\ProjectCore\Notifications::CanNotCopyMessage, $oException, $oException->getMessage()); } return $this->TrueResponse($oAccount, __FUNCTION__); }