diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/ajax/share.php | 6 | ||||
-rw-r--r-- | core/lostpassword/controller.php | 2 |
2 files changed, 2 insertions, 6 deletions
diff --git a/core/ajax/share.php b/core/ajax/share.php index 12206e0fd79..72ffc52e997 100644 --- a/core/ajax/share.php +++ b/core/ajax/share.php @@ -89,12 +89,8 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo if ($type === 'dir') $text = (string)$l->t('User %s shared the folder "%s" with you. It is available for download here: %s', array($user, $file, $link)); - // handle localhost installations - $server_host = OCP\Util::getServerHost(); - if ($server_host === 'localhost') - $server_host = "example.com"; - $default_from = 'sharing-noreply@' . $server_host; + $default_from = OCP\Util::getDefaultEmailAddress('sharing-noreply'); $from_address = OCP\Config::getUserValue($user, 'settings', 'email', $default_from ); // send it out now diff --git a/core/lostpassword/controller.php b/core/lostpassword/controller.php index 523520dc754..e64b16d3b83 100644 --- a/core/lostpassword/controller.php +++ b/core/lostpassword/controller.php @@ -43,7 +43,7 @@ class OC_Core_LostPassword_Controller { $tmpl->assign('link', $link, false); $msg = $tmpl->fetchPage(); $l = OC_L10N::get('core'); - $from = 'lostpassword-noreply@' . OCP\Util::getServerHost(); + $from = OCP\Util::getDefaultEmailAddress('lostpassword-noreply'); OC_Mail::send($email, $_POST['user'], $l->t('ownCloud password reset'), $msg, $from, 'ownCloud'); echo('Mailsent'); |