I'm facing an interesting issue and am not sure where to look for the solution.
Here are the details:
(1) php code is used to send an html message.
(2) the message contains Hebrew characters.
(3) when the message is received at the other end (a gmail account) by an auto parser,
all the Hebrew characters appear as question marks and the parser fails.
(4) when the message is
sent to any other destination (also gmail), being
opened and then forwarded to the parser, the
Hebrew chars are correctly received and parsed.
(5) when the message is
auto-forwarded from other email accounts to the parser, the
Hebrew chars appear as question marks again.
Relevant part of the PHP code:
Code:
$headers = "From: $from\r\n";
$headers .= "Content-type: text/html\r\n";
// $message is an html code with Hebrew content.
mail($to, $subject, $message, $headers);
as per RFC 1555:
http://www.ietf.org/rfc/rfc1555.txtHave tried also the following headers:
Code:
$headers = "From: $from\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=ISO-8859-8\r\n";
$headers .= "Content-transfer-encoding: BASE64 | Quoted-Printable\r\n";
and also with the following conversion:
Code:
mail($to, $subject, iconv("UTF-8", "ISO-8859-8//TRANSLIT", $message), $headers);any idea would be great !! cheers !!