Re: Mail subject encoding problem
| From: | Manuel Lemos | Date: | Sat, 31 Jan 2009 22:07:47 +0000 |
| Subject: | Re: Mail subject encoding problem | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-287502@lists.php.net to get a copy of this message | ||
Hello,
on 01/30/2009 11:43 AM Thodoris said the following:
> Yes I know that this is not reasonable but using UTF-8 fails. And this
> seems to work in some cases. I am thinking that this has to do with
> PHP's internal encoding or something with the OS. I am not sure why that
> works this way that's why I am asking for some enlightenment :-)
>
> Is there something that I need to set for PHP to change its behavior.
You cannot send 8 bit characters in e-mail. For headers you need to use
q-encoding to make your non-ASCIIC characters be represented with only
ASCII characters.
If you are not sure on how to encode message headers with q-encoding,
you may want to try this MIME message class. Take a look at the
test_email_message.php example to learn how to send messages with
non-ASCII characters on the headers or body.
http://www.phpclasses.org/mimemessage
--
Regards,
Manuel Lemos
Find and post PHP jobs
http://www.phpclasses.org/jobs/
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/