469,648 Members | 1,362 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,648 developers. It's quick & easy.

Show UTF-8 in the Subject of the mail

I've written the following codes to include utf-8 wordings in both the
subject and the content.

$headers = "MIME-Version: 1.0\r\n".
"Content-type: text/plain; charset=utf-8\r\n".
"From: ab*@abc.com";

mail("ta****@abc.com", "<some utf-8 wordings as subject>",
"<Another utf-8 wordings as content>", $headers);

In the email received, the content is fine , however, the subject
becomes 'strange characters'... How to solve this problem? Thanks a lot.

Dec 2 '05 #1
1 2244
ka****@gmail.com wrote:
I've written the following codes to include utf-8 wordings in both the
subject and the content.

$headers = "MIME-Version: 1.0\r\n".
"Content-type: text/plain; charset=utf-8\r\n".
"From: ab*@abc.com";

mail("ta****@abc.com", "<some utf-8 wordings as subject>",
"<Another utf-8 wordings as content>", $headers);

In the email received, the content is fine , however, the subject
becomes 'strange characters'... How to solve this problem? Thanks a lot.


Check out RFC 2047. You can use something like:
Subject: =?utf-8?b?...base64-encoded-subject...?
or
Subject: =?utf-8?q?...quoted-printable-subject...?
--
- Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
Dec 4 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Luis E Valencia | last post: by
23 posts views Thread by Allan Ebdrup | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.