From 4ac8b8016d6f70dfcd86a658bee53b543f7b7723 Mon Sep 17 00:00:00 2001 From: Tomasz Jakubowski Date: Tue, 12 Mar 2019 22:24:02 +0100 Subject: [PATCH] Add reply_to property and send it to email backend --- notifications/inc/class.notifications.inc.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/notifications/inc/class.notifications.inc.php b/notifications/inc/class.notifications.inc.php index d69836bc93..84ec2ac23c 100644 --- a/notifications/inc/class.notifications.inc.php +++ b/notifications/inc/class.notifications.inc.php @@ -112,6 +112,12 @@ class notifications { */ protected $sender; + /** + * email address for reply to + * @var string + */ + protected $reply_to; + /** * holds notification subject * @var string @@ -229,6 +235,16 @@ class notifications { return false; } + /** + * Set reply_to for the current notification + * + * @param $_reply_to string for email address to reply to + */ + public function set_reply_to($_reply_to) { + $this->reply_to = $_reply_to; + return true; + } + /** * Set receivers for the current notification * @@ -550,6 +566,8 @@ class notifications { if (!empty($this->popupsubject)) $lsubject = $this->popupsubject; if ($this->popup_links) $llinks = $this->popup_links; if (is_array($this->popup_data)) $popup_data = $this->popup_data; + } elseif ($backend == 'email') { + if (!empty($this->reply_to)) $popup_data = array( 'reply_to' => $this->reply_to ); } $obj->send($this->prepend_message($messages, $prepend_message), $lsubject, $llinks, $this->attachments, $popup_data);