瀏覽代碼

Fix for #500910 Bug (display wrong address in INBOX.SENT).

porco 23 年之前
父節點
當前提交
4dbe7466f1
共有 1 個文件被更改,包括 12 次插入2 次删除
  1. 12 2
      functions/mailbox_display.php

+ 12 - 2
functions/mailbox_display.php

@@ -36,7 +36,17 @@ function printMessageInfo($imapConnection, $t, $i, $key, $mailbox, $sort, $start
     }
     $msg = $msgs[$key];
 
-    $senderName = sqimap_find_displayable_name($msg['FROM']);
+    /**
+     * This is done in case you're looking into Sent folders,
+     * because you can have multi receiver.
+     */
+    $sendersName = split(',', $msg['FROM']);
+    for( $index = 0 ; $index < count($sendersName) ; $index++ ) {
+        if( strlen($senderName) > 0 )
+            $senderName .= ', ';
+        $senderName .= sqimap_find_displayable_name($sendersName[$index]);
+        }
+
     if( $mailbox == 'None' ) {
         // $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0);
         $boxes = sqimap_mailbox_list($imapConnection);
@@ -918,4 +928,4 @@ function handleAsSent($mailbox) {
     return ($handleAsSent_result);
 }
 
-?>
+?>