[imp] Displaying Mail Headers while Replying

Parag Godkar paragg at konark.ncst.ernet.in
Mon Mar 31 20:56:23 PST 2003


I am running Horde with the following
configuration -

Horde: 2.2.1
IMP: 3.2.1
Turba: 1.2

I found it strange that IMP displays mail
headers ( Original Message From )
while forwarding a mail but does
not display the mail headers while replying
to a mail.

Following is a patch that can be applied to 
../horde/imp/compose.php to display mail
headers ( Original Message From ) while
replying to a mail.
-----------------------------------------------------------------------------------------------------------------------------------

518,560d517
< 
< // ---------  Added by Parag ----------
<      if (!empty($index))
<       {
<          $h = imap_header($imp['stream'], imap_msgno($imp['stream'], $index));
<          if (isset($h->from[0]))
<          {
<              $message_source = IMP::addrObject2String($h->from[0]);
<          }
<          else
<          {
<              $message_source = '';
<          }
< //         $msg  = "\n\n";
<          $msg .= "\n----- ";
<          $msg .= sprintf(_("Original message from %s"), $message_source);
<          $msg .= " -----\n";
< 
<          if (isset($h->date) && $h->date) {
<              $msg .= _("    Date: ") . MIME::decode($h->date);
<              $msg .= "\n";
<          }
<          if (isset($h->from) && is_array($h->from)) {
<              $msg .= _("    From: ") . IMP::addrArray2String($h->from);
<              $msg .= "\n";
<          }
<          if (isset($h->reply_to) && is_array($h->reply_to)) {
<              $msg .= _("Reply-To: ") . IMP::addrArray2String($h->reply_to);
<              $msg .= "\n";
<          }
<          if (isset($h->subject) && $h->subject) {
<              $msg .= _(" Subject: ") . MIME::decode($h->subject);
<              $msg .= "\n";
<          }
<          if (isset($h->to) && is_array($h->to)) {
<              $msg .= _("      To: ") . IMP::addrArray2String($h->to);
<              $msg .= "\n";
<              $msg .= "\n";
<          }
<       }
< 
< // ----------- End of part added by Parag ------------
< 
632c589
<              $msg .= findBody($attachments);
---
>              $msg = findBody($attachments);
 
----------------------------------------------------------------------------------------------------------------------------------------------------------------------


I have also attached the patch to this mail.

Incidently the code has been taken from the 
"case FORWARD:" section of "compose.php"
itself.

Regards,
Parag Godkar.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: compose.php_reply-header.diff
Type: application/octet-stream
Size: 1599 bytes
Desc: not available
Url : http://lists.horde.org/archives/imp/attachments/20030331/182f567c/compose.php_reply-header.obj


More information about the imp mailing list