tochiro wrote:
> The page with the contact form is written in French with the following
> charset:
> <meta http-equiv="content-type" content="text/html;
> charset=iso-8859-1" />
But what does the real HTTP Content-Type header say?
> mail($myEmail,$subject,$formContent,"From: $myEmail\nReply-To:
> $myEmail\nCc: $me");
You should send a similar Content-Type header in your e-mail headers too,
and also I'd recommend using a quoted-printable transfer encoding.
$headers = "From: $myEmail\r\n"
. "Reply-To: $myEmail\r\n
. "Cc: $me\r\n"
. "MIME-Version: 1.0\r\n";
. "Content-Type: text/plain; charset=iso-8859-1\r\n"
. "Content-Transfer-Encoding: quoted-printable";
mail($myEmail,$subject,quoted_printable_encode($formContent),$headers);
Bizarrely, the quoted_printable_encode() function isn't included in the
standard PHP distribution (which only has a decode function!) but there are
a few example implementations of it here:
http://uk2.php.net/manual/en/function.quoted-printable-decode.php
Alternatively, if you have PHP's IMAP extension installed (check phpinfo
to see if you do) then you can use the imap_8bit() function:
$headers = "From: $myEmail\r\n"
. "Reply-To: $myEmail\r\n
. "Cc: $me\r\n"
. "MIME-Version: 1.0\r\n";
. "Content-Type: text/plain; charset=iso-8859-1\r\n"
. "Content-Transfer-Encoding: quoted-printable";
mail($myEmail,$subject,imap_8bit($formContent),$headers);
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~
http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux
* = I'm getting there!
>> Stay informed about: Accented Characters with html Form