本文整理汇总了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);