$utfencode=true 表示郵件為 utf8 編碼,$htmlsave=true 表示保留 html 格式,$decide=false 表示決定不必解碼。
[root@mail squirrelmail-1.4.8]# grep ^function.*decodeHeader -R /var/www/squirrelmail/
/var/www/squirrelmail/functions/mime.php:function decodeHeader ($string, $utfencode=true,$htmlsave=true,$decide=false) { //dywang debug this function
$utfencode=false,$htmlsave=false,$decide=true 三個參數。
[root@mail squirrelmail-1.4.8]# diff -wuN ./functions/mailbox_display.php /var/www/squirrelmail/functions/mailbox_display.php
--- ./functions/mailbox_display.php 2006-06-08 22:59:19.000000000 +0800
+++ /var/www/squirrelmail/functions/mailbox_display.php 2014-07-20 18:54:04.012333656 +0800
@@ -105,7 +105,7 @@
}
if ($senderNames_part[1]) {
- $senderName .= decodeHeader($senderNames_part[1]);
+ $senderName .= decodeHeader($senderNames_part[1],false,false,true); //dywang
} else {
$senderName .= htmlspecialchars($senderNames_part[0]);
}
@@ -196,7 +196,7 @@
}
$checked = ($checkall == 1) ? ' CHECKED' : '';
$col = 0;
- $msg['SUBJECT'] = decodeHeader($msg['SUBJECT']);
+ $msg['SUBJECT'] = decodeHeader($msg['SUBJECT'],false,false,true); //dywang
// $subject = processSubject($msg['SUBJECT'], $indent_array[$msg['ID']]);
$subject = truncateWithEntities(str_replace(' ',' ',$msg['SUBJECT']), $truncate_subject);
if (sizeof($index_order)) {