From a485653d6b2749334017a2e6624af55259aa3d21 Mon Sep 17 00:00:00 2001 From: Silke Meyer Date: Sat, 31 Jan 2015 08:46:05 +0100 Subject: [PATCH] Added setting to customize system notifications' sender email address --- include/enotify.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/enotify.php b/include/enotify.php index 99bc0fd324..2c940f614b 100644 --- a/include/enotify.php +++ b/include/enotify.php @@ -27,8 +27,12 @@ function notification($params) { $hostname = $a->get_hostname(); if(strpos($hostname,':')) $hostname = substr($hostname,0,strpos($hostname,':')); - - $sender_email = t('noreply') . '@' . $hostname; + + // $sender_email = t('noreply') . '@' . $hostname; + $sender_email = $a->config['sender_email']; + if (empty($sender_email)) { + $sender_email = t('noreply') . '@' . $hostname; + } $user = q("SELECT `nickname` FROM `user` WHERE `uid` = %d", intval($params['uid'])); if ($user)