php mail and accentuated characters
php mail and accentuated characters
am 31.12.2005 18:11:38 von Jean-Philippe BATTU
Hello
I would like to send email from my php program. So I use the mail() function
from php engine but I noticed that the accentuated characters were not well
transmitted by php or the apache server (I use a linux box with FC4 and httpd
server).
In the phpinfo function, I saw the LANG environnement variable was set to
en_US...., so I fixed it to fr_FR.... in the system file /etc/sysconfig/18n
and reboot the machine, phpinfo gave me the correct french LANG. The result
is still the same
the apache server gave me incorrect languages in server-info, so I corrected
the DefautLanguage directive and Priority Languages directives in the httpd.conf
file. Restart apache and server-info gave me correct information, but the
result is still the same.
I am in trouble, because the mutt linux program send well the accentuated
characters. I studied the difference between two mails, from mute and from
php, and apparently the order definition after the Date aren't the same.
I tried to use the phpmailer class, but the problem persists. I use php 4.3.10
The workaround I found is to use the mutt command from php by the system
function, but it is a pity !
Do you know this problem ?
thanks for your reply and happy new year to you !
Cheers
Jean-Philippe BATTU
Grenoble
http://jeanpba.homeip.net
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: php mail and accentuated characters
am 31.12.2005 19:25:14 von Micah Stevens
Check the encoding for the web page itself. Sounds like the page is telling
the client browser to encode differently than the server is encoding.
-Micah
On Saturday 31 December 2005 9:11 am, Jean-Philippe BATTU wrote:
> Hello
>
> I would like to send email from my php program. So I use the mail()
> function from php engine but I noticed that the accentuated characters
> were not well transmitted by php or the apache server (I use a linux box
> with FC4 and httpd server).
>
> In the phpinfo function, I saw the LANG environnement variable was set to
> en_US...., so I fixed it to fr_FR.... in the system file /etc/sysconfig/18n
> and reboot the machine, phpinfo gave me the correct french LANG. The result
> is still the same
>
> the apache server gave me incorrect languages in server-info, so I
> corrected the DefautLanguage directive and Priority Languages directives in
> the httpd.conf file. Restart apache and server-info gave me correct
> information, but the result is still the same.
>
> I am in trouble, because the mutt linux program send well the accentuated
> characters. I studied the difference between two mails, from mute and from
> php, and apparently the order definition after the Date aren't the same.
>
> I tried to use the phpmailer class, but the problem persists. I use php
> 4.3.10
>
> The workaround I found is to use the mutt command from php by the system
> function, but it is a pity !
>
> Do you know this problem ?
>
> thanks for your reply and happy new year to you !
>
> Cheers
>
>
>
>
> Jean-Philippe BATTU
> Grenoble
> http://jeanpba.homeip.net
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: php mail and accentuated characters
am 03.01.2006 02:39:03 von Manuel Lemos
Hello,
on 12/31/2005 03:11 PM Jean-Philippe BATTU said the following:
> I would like to send email from my php program. So I use the mail() function
> from php engine but I noticed that the accentuated characters were not well
> transmitted by php or the apache server (I use a linux box with FC4 and httpd
> server).
>
> In the phpinfo function, I saw the LANG environnement variable was set to
> en_US...., so I fixed it to fr_FR.... in the system file /etc/sysconfig/18n
> and reboot the machine, phpinfo gave me the correct french LANG. The result
> is still the same
>
> the apache server gave me incorrect languages in server-info, so I corrected
> the DefautLanguage directive and Priority Languages directives in the httpd.conf
> file. Restart apache and server-info gave me correct information, but the
> result is still the same.
>
> I am in trouble, because the mutt linux program send well the accentuated
> characters. I studied the difference between two mails, from mute and from
> php, and apparently the order definition after the Date aren't the same.
>
> I tried to use the phpmailer class, but the problem persists. I use php 4.3.10
>
> The workaround I found is to use the mutt command from php by the system
> function, but it is a pity !
>
> Do you know this problem ?
You need to use ISO-8859-1 characters set and q-encoding for using 8 bit
characters in the headers and quoted-printable in the body.
This is not so simple. You may want to try the MIME message class for
composing and sending messages that even comes with an example of how to
send messages with accents in the subject header and the body:
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/
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php