summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/ajax
diff options
context:
space:
mode:
authorFrank Karlitschek <frank@owncloud.org>2012-05-31 20:16:44 +0200
committerFrank Karlitschek <frank@owncloud.org>2012-05-31 20:16:44 +0200
commit5d425a9f799bf385d686d4f08f571509123899f6 (patch)
tree7170f934a5db5bbd433ab84faae19831765f52cd /apps/files_sharing/ajax
parent7ec3e37199c28cd289699e226254b571ca5c5938 (diff)
downloadnextcloud-server-5d425a9f799bf385d686d4f08f571509123899f6.tar.gz
nextcloud-server-5d425a9f799bf385d686d4f08f571509123899f6.zip
use our own serverHost call so that ownCloud works with reverse proxy servers
Diffstat (limited to 'apps/files_sharing/ajax')
-rw-r--r--apps/files_sharing/ajax/email.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/files_sharing/ajax/email.php b/apps/files_sharing/ajax/email.php
index 163683cd0e3..bdfa369418d 100644
--- a/apps/files_sharing/ajax/email.php
+++ b/apps/files_sharing/ajax/email.php
@@ -7,7 +7,7 @@ $type = (strpos($_POST['file'], '.') === false) ? 'folder' : 'file';
$subject = $user.' shared a '.$type.' with you';
$link = $_POST['link'];
$text = $user.' shared the '.$type.' '.$_POST['file'].' with you. It is available for download here: '.$link;
-$fromaddress = OCP\Config::getUserValue($user, 'settings', 'email', 'sharing-noreply@'.$_SERVER['HTTP_HOST']);
-OC_Mail::send($_POST['toaddress'], $_POST['toaddress'], $subject, $text, $fromaddress, $user);
+$fromaddress = OCP\Config::getUserValue($user, 'settings', 'email', 'sharing-noreply@'.OCP\Util::getServerHost());
+OCP\Util::sendMail($_POST['toaddress'], $_POST['toaddress'], $subject, $text, $fromaddress, $user);
-?> \ No newline at end of file
+?>