- added more hooks
[squirrelmail.git] / src / compose.php
index 85aba1815a9625b7b03d20f75de13e9de900e863..afc4652203ee303c62c704a62d67dff46738d005 100644 (file)
@@ -75,7 +75,7 @@
          $body = "";
          for ($i=0; $i < count($body_ary); $i++) {
             if ($i==0 && $forward_id) {
-               $tmp = "-------- " . _("Original Message") . " --------";
+               $tmp = "-------- " . _("Original Message") . " --------\n";
                $tmp .= _("Subject") . ": " . $orig_header->subject . "\n"; 
                $tmp .= "   " . _("From") . ": " . $orig_header->from . "\n"; 
                $tmp .= "     " . _("To") . ": " . $orig_header->to[0] . "\n"; 
 
       /** This formats a CC string if they hit "reply all" **/
       if ($send_to_cc != "") {
+         $send_to_cc = ereg_replace( '"[^"]*"', "", $send_to_cc);
          $send_to_cc = ereg_replace(";", ",", $send_to_cc);
          $sendcc = explode(",", $send_to_cc);
          $send_to_cc = "";
          echo "// --></SCRIPT>\n\n";
       }
 
-      echo "\n<FORM name=compose action=\"compose.php\" METHOD=POST>\n";
+      echo "\n<FORM name=compose action=\"compose.php\" METHOD=POST ENCTYPE=\"multipart/form-data\">\n";
+      //echo "\n<FORM name=compose action=\"compose.php\" METHOD=POST>\n";
       if ($reply_id) {
          echo "<input type=hidden name=reply_id value=$reply_id>\n";
       }                 
 
       echo "</TABLE>\n";
       echo "</FORM>";
+      do_hook("compose_bottom");
    }
 
    function showSentForm () {
           error message, show=true **/
       global $body, $send_to, $subject, $color;
 
-      if ($body == "" && $subject == "") {
-         if ($show)
-            plain_error_message(_("You have not entered a message body or a subject."), $color);
-         return false;
-      } else if ($send_to == "") {
+      if ($send_to == "") {
          if ($show)
             plain_error_message(_("You have not filled in the \"To:\" field."), $color);
          return false;