Fixed a few minor bugs. Mail address was wrong when replying.
authorgustavf <gustavf@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 23 Feb 2000 14:28:59 +0000 (14:28 +0000)
committergustavf <gustavf@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 23 Feb 2000 14:28:59 +0000 (14:28 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@242 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/compose.php

index 1befa6a..c2ebe66 100644 (file)
@@ -27,6 +27,9 @@
       global $forward_id, $imapConnection, $msg, $ent_num, $body_ary, $body,
          $reply_id, $send_to, $send_to_cc, $mailbox;
 
+      $send_to = rfc1522Decode($send_to);
+      $send_to_cc = rfc1522Decode($send_to_cc);
+
       if ($forward_id) {
          sqimap_mailbox_select($imapConnection, $mailbox);
          $msg = sqimap_get_message($imapConnection, $forward_id, $mailbox);
          }
       }
       
-      $send_to = sqimap_find_displayable_name($send_to);
+      $send_to = sqimap_find_email($send_to);
       
-      $send_to = strtolower($send_to);
       $send_to = ereg_replace("\"", "", $send_to);
       $send_to = stripslashes($send_to);
       
             if ($sendcc[$i] == "")
                continue;
             
-            $sendcc[$i] = sqimap_find_displayable_name($sendcc[$i]);
+            $sendcc[$i] = sqimap_find_email($sendcc[$i]);
             $whofrom = sqimap_find_displayable_name($msg["HEADER"]["FROM"]);
             $whoreplyto = sqimap_find_email($msg["HEADER"]["REPLYTO"]);
          
          $passed_body, $color, $use_signature, $signature, $editor_size,
          $attachments, $subject, $newmail;
 
+      $subject = rfc1522Decode($subject);
+      $reply_subj = rfc1522Decode($reply_subj);
+      $forward_subj = rfc1522Decode($forward_subj);
+
       echo "\n<FORM action=\"compose.php\" METHOD=POST\n";
       echo "ENCTYPE=\"multipart/form-data\">\n";
       echo "<TABLE COLS=2 WIDTH=50 ALIGN=center CELLSPACING=0 BORDER=0>\n";
       showInputForm();
    } else if (isset($do_delete)) {
       while (list($key, $localname) = each($delete)) {
-         array_splice ($attachments, $localname, 1);
+         array_splice ($attachments, $key, 1);
          unlink ($attachment_dir.$localname);
          unlink ($attachment_dir.$localname.".info");
       }