added "reply-to" capabilities
[squirrelmail.git] / src / read_body.php
index 7e98d1a..88c1093 100644 (file)
@@ -22,7 +22,7 @@
    /** translate the subject and mailbox into url-able text **/
    $url_subj = urlencode(trim($message["HEADER"]["SUBJECT"]));
    $urlMailbox = urlencode($mailbox);
-   $url_from = urlencode($message["HEADER"]["FROM"]);
+   $url_replyto = urlencode($message["HEADER"]["REPLYTO"]);
 
    $dateString = getLongDateString($message["HEADER"]["DATE"]);
 
@@ -91,7 +91,7 @@
    echo "            </TD><TD WIDTH=50% ALIGN=RIGHT>";
    echo "               <FONT FACE=\"Arial,Helvetica\" SIZE=2>";
    echo "               <A HREF=\"compose.php?forward_id=$passed_id&forward_subj=$url_subj&mailbox=$urlMailbox\">Forward</A>&nbsp;&nbsp;";
-   echo "               <A HREF=\"compose.php?send_to=$url_from&reply_subj=$url_subj&reply_id=$passed_id&mailbox=$urlMailbox\">Reply</A>&nbsp;&nbsp;";
+   echo "               <A HREF=\"compose.php?send_to=$url_replyto&reply_subj=$url_subj&reply_id=$passed_id&mailbox=$urlMailbox\">Reply</A>&nbsp;&nbsp;";
    echo "               </FONT>";
    echo "            </TD>";
    echo "         </TR>";
 
    echo "   <TR><TD BGCOLOR=FFFFFF WIDTH=100%>\n";
    $body = formatBody($message);
+
    for ($i = 0; $i < count($body); $i++) {
       echo "$body[$i]";
    }
 
-/*   if (count($message["ENTITIES"]) > 1) {
-      echo "</TD></TR><TR><TD BGCOLOR=DCDCDC><CENTER><B><FONT COLOR=DD0000>This is a multipart MIME encoded message.</FONT></B></CENTER></TD></TR><TR><TD BGCOLOR=FFFFFF WIDTH=100%>";
-      echo "";
-
-      $i = 0;
-      $q = 0;
-      $entity[0] = $i;
-      while ($i < count($message["ENTITIES"])) {
-         $b = $i + 1;
-         echo "</TD></TR><TR><TD BGCOLOR=DCDCDC><CENTER>Part $b</CENTER></TD></TR><TR><TD BGCOLOR=FFFFFF WIDTH=100%>";
-         for ($p = 0; $p < count($message["ENTITIES"][$i][0]["BODY"]); $p++) {
-            echo $message["ENTITIES"][$i][0]["BODY"][$p];
-         }
-         $i++;
-      }
-   } else {
-      echo "</TD></TR><TR><TD BGCOLOR=DCDCDC><CENTER><B><FONT COLOR=DD0000>This is a single part MIME encoded message.</FONT></B></CENTER></TD></TR><TR><TD BGCOLOR=FFFFFF WIDTH=100%>";
-      for ($p = 0; $p < count($message["ENTITIES"][0]["BODY"]); $p++) {
-         echo $message["ENTITIES"][0]["BODY"][$p];
-      }
-   }
-*/
    echo "   <BR></TD></TR>\n";
    echo "   <TR><TD BGCOLOR=DCDCDC>&nbsp;</TD></TR>";
    echo "</TABLE>\n";