From e14ded6ef714aef3e09ee4698aa2229e8a63b1e1 Mon Sep 17 00:00:00 2001 From: porco Date: Thu, 10 Jan 2002 11:48:29 +0000 Subject: [PATCH] Fix for #500910 Bug (display wrong address in INBOX.SENT). git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2110 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/mailbox_display.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php index aaf4071c..1fdcc78c 100644 --- a/functions/mailbox_display.php +++ b/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); } -?> \ No newline at end of file +?> -- 2.25.1