I am going to send mail through a PHP website. The client may customize the mail subject and I will get the post data in UTF-8. But when I send out an HTML e-mail using the PHP mail(),
I found that the subject does not show properly but the body does.
How do I send a chinese word in the PHP mail function?
Thanks.
You need to encode the subject according to how encoded-word is specified (see RFC 2047):
You can either use
the Base64 encoding (
base64_encode):or
the quoted-printable encoding (see RFC 2045,
imap_8bit):