From 8849c1972dffb29f75627a3c3e080cd42d141905 Mon Sep 17 00:00:00 2001
From: JediKev <kevin@enhancesoft.com>
Date: Fri, 1 Nov 2019 11:28:31 -0500
Subject: [PATCH] issue: In-Reply-To Header

This addresses an issue raised in 5111 where the `in-reply-to` header is not
sent with outgoing emails. This is due to the `$recipients` variable being
an instance of `MailingList` which is not handled correctly in
`class.mailer.php`. This adds a new case to handle `MailingList` directly.
---
 include/class.mailer.php | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/class.mailer.php b/include/class.mailer.php
index 15a08d1df..9a1f6dd5a 100644
--- a/include/class.mailer.php
+++ b/include/class.mailer.php
@@ -330,6 +330,9 @@ class Mailer {
 
                 $entry = null;
                 switch (true) {
+                case $recipients instanceof MailingList:
+                    $entry = $thread->getLastEmailMessage();
+                    break;
                 case $recipients instanceof TicketOwner:
                 case $recipients instanceof Collaborator:
                     $entry = $thread->getLastEmailMessage(array(
-- 
GitLab