From 66dfc3f1833c4ec40606761189bf29b165ca66e8 Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Tue, 22 Jul 2025 00:57:38 +0200 Subject: [PATCH] Fix reply to in ticket emails --- htdocs/ticket/class/ticket.class.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index 368c475d9c7..fc928561a3b 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -2823,8 +2823,10 @@ class Ticket extends CommonObject $from = getDolGlobalString('TICKET_NOTIFICATION_EMAIL_FROM'); + $replyto = getDolGlobalString('TICKET_NOTIFICATION_EMAIL_REPLYTO'); + // don't try to send email if no recipient - $this->sendTicketMessageByEmail($subject, $message, 0, $sendto, $listofpaths, $listofmimes, $listofnames, array(), $from); + $this->sendTicketMessageByEmail($subject, $message, 0, $sendto, $listofpaths, $listofmimes, $listofnames, array(), $from, $replyto); } } } else { @@ -3017,7 +3019,9 @@ class Ticket extends CommonObject if (!empty($sendto)) { $from = getDolGlobalString('TICKET_NOTIFICATION_EMAIL_FROM'); - $result = $this->sendTicketMessageByEmail($subject, $message, 0, $sendto, $listofpaths, $listofmimes, $listofnames, $sendtocc, $from); + $replyto = getDolGlobalString('TICKET_NOTIFICATION_EMAIL_REPLYTO'); + + $result = $this->sendTicketMessageByEmail($subject, $message, 0, $sendto, $listofpaths, $listofmimes, $listofnames, $sendtocc, $from, $replyto); if ($result) { // update last_msg_sent date of ticket (for last message sent to external users) $this->date_last_msg_sent = dol_now();