|
Posted by Manuel Lemos on 02/06/07 00:01
Hello,
on 02/05/2007 05:03 PM Jean-Guy Mouton said the following:
> Hello,
>
> I have a very simple form with 3 fields on a Web page and one of them is a
> comment field. I use the mail() function to send it. My problem is that the
> comment arrives with weird characters instead of the accented characters.
>
> Is there a simple way in PHP to encode the message so that it arrives with
> correct accented characters in the email client?
Yes, you need to use q-encoding for non-ASCII characters in the headers
and quoted-printable encoding in the body.
There are RFC that explain that, but it is not a trivial standard
specification. You may want to try a ready to use class to encode the
message as you need in the character set you use, like for instance the
MIME message composing and sending class:
http://www.phpclasses.org/mimemessage
--
Regards,
Manuel Lemos
Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
Navigation:
[Reply to this message]
|