本文整理匯總了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);