Lots of changes to get closer to having save as draft working. Please, keep working...
[squirrelmail.git] / functions / imap_messages.php
index 70d9b08dbcd13afdb1e650e31a5dc8e47e5258ba..4cef81eb67270c6d481b225aee68c9f3c3858b46 100755 (executable)
       $read_list = array();
       $sizes_list = array();
 
-      /* We need to return the data in the same order as the caller supplied
-         in $msg_list, but IMAP servers are free to return responses in
-         whatever order they wish... So we need to re-sort manually */
-
+      /**
+       * We need to return the data in the same order as the caller supplied
+       * in $msg_list, but IMAP servers are free to return responses in
+       * whatever order they wish... So we need to re-sort manually
+       */
       for ($i = 0; $i < sizeof($msg_list); $i++) {
          $id2index[$msg_list[$i]] = $i;
       }
       fputs ($imap_stream, $query);
       $readin_list = sqimap_read_data_list($imap_stream, $sid, true, $response, $message);
 
-
       foreach ($readin_list as $r) {
          if (!eregi("^\\* ([0-9]+) FETCH", $r[0], $regs)) {
             set_up_language($squirrelmail_language);
          $size = $regs[1];
          
          $header = new small_header;
-         if ($issent == true)
-            $header->from = (trim($to) != '')? $to : _("(only Cc/Bcc)");
-         else   
+         if ($issent == true) {
+            $header->from = (trim($to) != '' ? $to : '(' ._("No To Address") . ')');
+         } else {
             $header->from = $from;
+         }
 
          $header->date = $date;
          $header->subject = $subject;