Unfortunately, osTicket 1.6 RC5 does not show the sender's name, address, and subject of mail messages even though these "fields" may contain important information. The following is a mod to include the From: and Subject: header from the original mail message.
For now I am only offering this in form of (diff -u) lists (the .O files are the original files). If someone needs help with this let me know.
--- include/staff/viewticket.inc.php.O 2009-07-21 18.000000000 +0200
+++ include/staff/viewticket.inc.php 2010-01-10 02.000000000 +0100
@@ -227,19 +227,23 @@
<div id="ticketthread">
<?
//get messages
- $sql='SELECT msg.msg_id,msg.created,msg.message,count(attach_id) as attachments FROM '.TICKET_MESSAGE_TABLE.' msg '.
+ $sql='SELECT msg.msg_id,msg.created,msg.message,msg.headers,count(attach_id) as attachments FROM '.TICKET_MESSAGE_TABLE.' msg '.
' LEFT JOIN '.TICKET_ATTACHMENT_TABLE." attach ON msg.ticket_id=attach.ticket_id AND msg.msg_id=attach.ref_id AND ref_type='M' ".
' WHERE msg.ticket_id='.db_input($id).
' GROUP BY msg.msg_id ORDER BY created';
$msgres =db_query($sql);
while ($msg_row = db_fetch_array($msgres)) {
+ preg_match('/^From:(.*)/m', $msg_row,$myfrom);
+ preg_match('/^(Subject:.*)/m', $msg_row,$mysubject);
+ $myfrom = ($myfrom) ? ' — '.htmlspecialchars($myfrom) : '';
+ $mysubject = ($mysubject) ? '<em>'.htmlspecialchars($mysubject)."</em><br>\n<br>\n" : '';
?>
<table align="center" class="message" cellspacing="0" cellpadding="1" width="100%" border=0>
- <tr><th><?=Format:($msg_row)?></th></tr>
+ <tr><th><?=Format:($msg_row).$myfrom?></th></tr>
<?if($msg_row>0){ ?>
<tr class="header"><td><?=$ticket->getAttachmentStr($msg_row,'M')?></td></tr>
<?}?>
- <tr><td><?=Format:($msg_row)?> </td></tr>
+ <tr><td><?=$mysubject . Format:($msg_row)?> </td></tr>
</table>
<?
//get answers for messages
--- include/client/viewticket.inc.php.O 2009-06-26 11.000000000 +0200
+++ include/client/viewticket.inc.php 2010-01-10 02.000000000 +0100
@@ -68,14 +68,18 @@
' GROUP BY msg.msg_id ORDER BY created';
$msgres =db_query($sql);
while ($msg_row = db_fetch_array($msgres)):
preg_match('/^From:(.*)/m', $msg_row,$myfrom);
preg_match('/^(Subject:.*)/m', $msg_row,$mysubject);
$myfrom = ($myfrom) ? ' — '.htmlspecialchars($myfrom) : '';
+ $mysubject = ($mysubject) ? '<em>'.htmlspecialchars($mysubject)."</em><br>\n<br>\n" : '';
?>
<table align="center" class="message" cellspacing="0" cellpadding="1" width="100%" border=0>
- <tr><th><?=Format:($msg_row)?></th></tr>
+ <tr><th><?=Format:($msg_row).$myfrom?></th></tr>
<?if($msg_row>0){ ?>
<tr class="header"><td><?=$ticket->getAttachmentStr($msg_row,'M')?></td></tr>
<?}?>
<tr class="info">
- <td><?=Format:($msg_row)?></td></tr>
+ <td><?=$mysubject . Format:($msg_row)?></td></tr>
</table>
<?
//get answers for messages