fixed bug that didn't send "from" header correctly. It sent it without
authorlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 15 Jul 2000 15:32:41 +0000 (15:32 +0000)
committerlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sat, 15 Jul 2000 15:32:41 +0000 (15:32 +0000)
quotes around the name like this:  Luke Ehresman <luke@squirrelmail.org>

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@620 7612ce4b-ef26-0410-bec9-ea0150e637f0

functions/smtp.php
src/compose.php

index 5900fe9..fae9ea7 100644 (file)
          if ($from == "")
             $from = "<$from_addr>";
          else
-            $from = encodeHeader($from) . " <$from_addr>";
+            $from = "\"" . encodeHeader($from) . "\" <$from_addr>";
          
          /* This creates an RFC 822 date */
          $date = date("D, j M Y H:i:s ", mktime()) . timezone();
index 4c473d8..85aba18 100644 (file)
@@ -43,8 +43,8 @@
       global $forward_id, $imapConnection, $msg, $ent_num, $body_ary, $body,
          $reply_id, $send_to, $send_to_cc, $mailbox, $send_to_bcc;
 
-      $send_to = decodeHeader($send_to);
-      $send_to_cc = decodeHeader($send_to_cc);
+      $send_to = stripslashes(decodeHeader($send_to));
+      $send_to_cc = stripslashes(decodeHeader($send_to_cc));
 
       if ($forward_id)
          $id = $forward_id;
@@ -75,7 +75,7 @@
          $body = "";
          for ($i=0; $i < count($body_ary); $i++) {
             if ($i==0 && $forward_id) {
-               $tmp = _("-------- Original Message ---------\n");
+               $tmp = "-------- " . _("Original Message") . " --------";
                $tmp .= _("Subject") . ": " . $orig_header->subject . "\n"; 
                $tmp .= "   " . _("From") . ": " . $orig_header->from . "\n"; 
                $tmp .= "     " . _("To") . ": " . $orig_header->to[0] . "\n"; 
          return $body;   
       }
 
+      $send_to = stripslashes($send_to);
+      
       if (!$send_to) {
          $send_to = sqimap_find_email($send_to);
       }
 
-//      $send_to = ereg_replace("\"", "", $send_to);
-      $send_to = stripslashes($send_to);
-      
       /** This formats a CC string if they hit "reply all" **/
       if ($send_to_cc != "") {
          $send_to_cc = ereg_replace(";", ",", $send_to_cc);
          echo "// --></SCRIPT>\n\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 "      <INPUT TYPE=\"hidden\" name=\"MAX_FILE_SIZE\"\n";
       //      echo "      value=\"10000\">\n";
       echo "      <INPUT NAME=\"attachfile\" TYPE=\"file\">\n";
-      echo "      &nbsp;&nbsp;<input type=\"submit\" name=\"attach\"\n";
-      echo "      value=\"" . _("Add") ."\">\n";
+      echo "      &nbsp;&nbsp;<input type=\"submit\" name=\"attach\"";
+      echo " value=\"" . _("Add") ."\">\n";
       echo "     </td>\n";
       echo "   </tr>\n";
       if (isset($attachments) && count($attachments)>0) {