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();