You are here: Re: mail() function and accented characters « PHP Language « IT news, forums, messages
Re: mail() function and accented characters

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация