blob: c0835f4946e7fc389c0edf4df4bda6cfed3ca0a2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
<?php
OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('files_sharing');
$user = OCP\USER::getUser();
// TODO translations
$subject = $user + ' ' + 'shared a file with you';
$link = $_POST['link'] + '&f=' + $_POST['f'];
$text = $user + ' ' + 'shared the file' + ' ' + $_POST['f'] + ' ' + 'with you.' + ' ' + 'It is available for download here:' + ' ' + $link;
$fromaddress = OC_Preferences::getValue($user, 'settings', 'email', 'owncloud.org');
OC_Mail::send($_POST['toaddress'], $_POST['toaddress'], $subject, $text, $fromaddress, $user);
?>
|