當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Share::setSendMailStatus方法代碼示例

本文整理匯總了PHP中OCP\Share::setSendMailStatus方法的典型用法代碼示例。如果您正苦於以下問題:PHP Share::setSendMailStatus方法的具體用法?PHP Share::setSendMailStatus怎麽用?PHP Share::setSendMailStatus使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在OCP\Share的用法示例。


在下文中一共展示了Share::setSendMailStatus方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: array_diff

     $recipientList = array_diff($recipientList, array(\OCP\User::getUser()));
     $mailNotification = new OC\Share\MailNotifications();
     $result = $mailNotification->sendInternalShareMail($recipientList, $itemSource, $itemType);
     \OCP\Share::setSendMailStatus($itemType, $itemSource, $shareType, $recipient, true);
     if (empty($result)) {
         OCP\JSON::success();
     } else {
         OCP\JSON::error(array('data' => array('message' => $l->t("Couldn't send mail to following users: %s ", implode(', ', $result)))));
     }
     break;
 case 'informRecipientsDisabled':
     $itemSource = (string) $_POST['itemSource'];
     $shareType = (int) $_POST['shareType'];
     $itemType = (string) $_POST['itemType'];
     $recipient = (string) $_POST['recipient'];
     \OCP\Share::setSendMailStatus($itemType, $itemSource, $shareType, $recipient, false);
     OCP\JSON::success();
     break;
 case 'email':
     // read post variables
     $link = (string) $_POST['link'];
     $file = (string) $_POST['file'];
     $to_address = (string) $_POST['toaddress'];
     $mailNotification = new \OC\Share\MailNotifications();
     $expiration = null;
     if (isset($_POST['expiration']) && $_POST['expiration'] !== '') {
         try {
             $date = new DateTime((string) $_POST['expiration']);
             $expiration = $date->getTimestamp();
         } catch (Exception $e) {
             \OCP\Util::writeLog('sharing', "Couldn't read date: " . $e->getMessage(), \OCP\Util::ERROR);
開發者ID:heldernl,項目名稱:owncloud8-extended,代碼行數:31,代碼來源:share.php


注:本文中的OCP\Share::setSendMailStatus方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。