openwebmail收信人過多亂碼問題 - Linux
By Charlotte
at 2013-02-06T16:38
at 2013-02-06T16:38
Table of Contents
openwebmail 2.53收信人如果別名有中文且收件人很多的話信件會變成亂碼
mail原始碼情形大概如下
From: "=?UTF-8?Q?=E5=BC=B5=E5=90=9B=E8=B1...
To: =?UTF-8?Q?=E5=BC=B5=E5=90=9B=E8=B1=AA... ←收件者
Message-Id: <20130206065804.E2FD24E50530@...
Date: Wed, 6 Feb 2013 14:58:04 +0800 (CS...
Status: RO
X-UID: 2785
Content-Length: 2404
=?UTF-8?Q?___=E5=BC=B5=E5=90=9B=E8=B1=AA_... ←收件者
=?UTF-8?Q?___=E5=BC=B5=E5=90=9B=E8=B1=AA_... ←收件者
Subject: test
Date: Wed, 6 Feb 2013 14:58:04 +0800
收件者沒有在同一個區塊
不知道是一行超過字元限制還是換行字元轉utf8會有問題
修正/var/www/cgi-bin/openwebmail/openwebmail-send.pl
在約1880行處
原本CODE
if ($to ne '') {
$s = "To: ".ow::mime::encode_mimewords(folding($to),
('Charset'=>$composecharset))."\n";
dump_str($s, $smtp, $folderhandle, $do_send, $do_save, \$senderr, \$saveerr);
$messageheader.=$s;
}
改成
if ($to ne '') {
$s = "To: ".folding(ow::mime::encode_mimewords($to,
('Charset'=>$composecharset)))."\n";
dump_str($s, $smtp, $folderhandle, $do_send, $do_save, \$senderr, \$saveerr);
$messageheader.=$s;
}
先把收件者轉成utf-8再folding
openwebmail code看了半天跟大家分享~
--
mail原始碼情形大概如下
From: "=?UTF-8?Q?=E5=BC=B5=E5=90=9B=E8=B1...
To: =?UTF-8?Q?=E5=BC=B5=E5=90=9B=E8=B1=AA... ←收件者
Message-Id: <20130206065804.E2FD24E50530@...
Date: Wed, 6 Feb 2013 14:58:04 +0800 (CS...
Status: RO
X-UID: 2785
Content-Length: 2404
=?UTF-8?Q?___=E5=BC=B5=E5=90=9B=E8=B1=AA_... ←收件者
=?UTF-8?Q?___=E5=BC=B5=E5=90=9B=E8=B1=AA_... ←收件者
Subject: test
Date: Wed, 6 Feb 2013 14:58:04 +0800
收件者沒有在同一個區塊
不知道是一行超過字元限制還是換行字元轉utf8會有問題
修正/var/www/cgi-bin/openwebmail/openwebmail-send.pl
在約1880行處
原本CODE
if ($to ne '') {
$s = "To: ".ow::mime::encode_mimewords(folding($to),
('Charset'=>$composecharset))."\n";
dump_str($s, $smtp, $folderhandle, $do_send, $do_save, \$senderr, \$saveerr);
$messageheader.=$s;
}
改成
if ($to ne '') {
$s = "To: ".folding(ow::mime::encode_mimewords($to,
('Charset'=>$composecharset)))."\n";
dump_str($s, $smtp, $folderhandle, $do_send, $do_save, \$senderr, \$saveerr);
$messageheader.=$s;
}
先把收件者轉成utf-8再folding
openwebmail code看了半天跟大家分享~
--
Tags:
Linux
All Comments
Related Posts
為什麼Dolphin總是這麼不穩定?
By Ida
at 2013-02-06T13:48
at 2013-02-06T13:48
Make抓頭檔案裡的變量
By Hedy
at 2013-02-06T08:29
at 2013-02-06T08:29
用RedHat6 (64bit)架設vpn,無法正常連入
By Eden
at 2013-02-06T05:32
at 2013-02-06T05:32
小筆電EEEPC 1015PEM 灌Linux一些問題
By Dinah
at 2013-02-05T22:22
at 2013-02-05T22:22
用RedHat6 (64bit)架設vpn,無法正常連入
By Rachel
at 2013-02-05T13:56
at 2013-02-05T13:56