Fix reply to in ticket emails

This commit is contained in:
ldestailleur
2025-07-22 00:57:38 +02:00
parent e5c582f18f
commit 66dfc3f183

View File

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