diff options
Diffstat (limited to 'app/Model/Notification.php')
-rw-r--r-- | app/Model/Notification.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/app/Model/Notification.php b/app/Model/Notification.php index 2b6e6a71..18089122 100644 --- a/app/Model/Notification.php +++ b/app/Model/Notification.php @@ -101,11 +101,18 @@ class Notification extends Base public function sendEmails($template, array $users, array $data) { try { + + $author = ''; + + if (Session::isOpen()) { + $author = e('%s via Kanboard', $this->user->getFullname($this->session['user'])); + } + $mailer = Swift_Mailer::newInstance($this->container['mailer']); $message = Swift_Message::newInstance() ->setSubject($this->getMailSubject($template, $data)) - ->setFrom(array(MAIL_FROM => 'Kanboard')) + ->setFrom(array(MAIL_FROM => $author ?: 'Kanboard')) ->setBody($this->getMailContent($template, $data), 'text/html'); foreach ($users as $user) { |