Replies and messages sent from osticket did not have the References or In-Reply-To headers used by email clients like gmail to show threaded messages. It would be helpful for customers to see all messages related to a ticket under a single thread than have their inboxes crowded with different messages under the same ticket.
The attached patch is for osticket_1.6.rc5 and it can be applied from outside the upload folder.
The modifications will use the message id from last sent message from the client for that ticket as the references and in-reply-to header
[gmail-references-in-reply-to.patch.zip](https://forum.osticket.com/assets/files/migrated/3/5f7dedd056b05c37fa84f3e137d88d1.zip)