php-i18n Digest 1 May 2002 11:44:16 -0000 Issue 107

Topics (messages 253 through 255):

Corrupt Japanese mail headers using mb_send_mail
        253 by: Lew Mark-Andrews
        254 by: Yasuo Ohgaki

convert access to JAVA PHP mysql Xml Soap
        255 by: Jacky Kenna

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
Hi all,

Using PHP 4.1.2, mbstring enabled on Linux

I've been trying to send a test message containing Japanese Kanji in the
"to, from and reply-to" headers using mb_send_mail() as in the following
code:
<?
$my_to = "KANJI KANJI <[EMAIL PROTECTED]>";
$my_subject = "KANJI KANJI";
$my_message = "KANJI KANJI KANJI KANJI";
$my_headers = "From: KANJI KANJI <[EMAIL PROTECTED]>\r\n";
$my_headers .= "Reply-To: KANJI KANJI <[EMAIL PROTECTED]>\r\n";
mb_send_mail($my_to,$my_subject,$my_message,$my_headers);
?>
In the received message, the subject and message body Kanji are properly
encoded. The Kanji in the other headers is corrupted and unreadable.
Looking at the source of the received message's headers shows that those
other headers weren't encoded (there's no =?ISO-2022-JP?B?***==?=).

I've confirmed that mb_language() was set to Japanese, and Content-Type:
text/plain; charset=ISO-2022-JP and Content-Transfer-Encoding: 7bit were
visible in the message source.

I thought mb_send_mail() encoded all the headers given it.
What do I need to do to properly send mail with Kanji in the headers?
How is everyone doing this? Any help, pointers, secrets much appreciated.

Thanks,
Lew Mark-Andrews


--- End Message ---
--- Begin Message ---
Hi,

You are supposed to encode them by yourself.
Use mb_encode_mime() for that.

You need to decoded by yourself, too.

--
Yasuo Ohgaki


Lew Mark-Andrews wrote:
> Hi all,
> 
> Using PHP 4.1.2, mbstring enabled on Linux
> 
> I've been trying to send a test message containing Japanese Kanji in the
> "to, from and reply-to" headers using mb_send_mail() as in the following
> code:
> <?
> $my_to = "KANJI KANJI <[EMAIL PROTECTED]>";
> $my_subject = "KANJI KANJI";
> $my_message = "KANJI KANJI KANJI KANJI";
> $my_headers = "From: KANJI KANJI <[EMAIL PROTECTED]>\r\n";
> $my_headers .= "Reply-To: KANJI KANJI <[EMAIL PROTECTED]>\r\n";
> mb_send_mail($my_to,$my_subject,$my_message,$my_headers);
> ?>
> In the received message, the subject and message body Kanji are properly
> encoded. The Kanji in the other headers is corrupted and unreadable.
> Looking at the source of the received message's headers shows that those
> other headers weren't encoded (there's no =?ISO-2022-JP?B?***==?=).
> 
> I've confirmed that mb_language() was set to Japanese, and Content-Type:
> text/plain; charset=ISO-2022-JP and Content-Transfer-Encoding: 7bit were
> visible in the message source.
> 
> I thought mb_send_mail() encoded all the headers given it.
> What do I need to do to properly send mail with Kanji in the headers?
> How is everyone doing this? Any help, pointers, secrets much appreciated.
> 
> Thanks,
> Lew Mark-Andrews
> 
> 


--- End Message ---
--- Begin Message ---

Hi  We are a publishing company based in London. We have developed a
multi-user
MS Access contact management and bookkeeping database system which we want
to adapt / re-write such that it can be used over the web ( ASP) using
Internet
Explorer (or similar) from any location, as our clients would like to use
it.

We are therefore looking for someone to develope or who will head a team of
developers and
co-ordinate this project. If you are interested in working with us on this,
please e-mail [EMAIL PROTECTED] with a brief outline of your knowledge
and experience of programming languages and I will get back to you as soon
as possible.

Jacky Kenna
Managing Director, PDA
0207 384 1985
[EMAIL PROTECTED]



--- End Message ---

Reply via email to