Hi
I am having trouble dealing with foreign characters (non English) in the subject of an email generated using the mail() function.
An example subject: André is here
I have been trying to use this site ( for more info on how to do it and have been semi successful![Smile :) :)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
This is the cunning bit...
When the email is received by Outlook 2003/2007 the accented character is replaced with X (AndrX is here). Yet when it received by a Hotmail or Yahoo account, it is displayed correctly.
Has anybody else had this problem or any ideas why it is happening?
Cheers
Rob
I am having trouble dealing with foreign characters (non English) in the subject of an email generated using the mail() function.
An example subject: André is here
I have been trying to use this site ( for more info on how to do it and have been semi successful
This is the cunning bit...
When the email is received by Outlook 2003/2007 the accented character is replaced with X (AndrX is here). Yet when it received by a Hotmail or Yahoo account, it is displayed correctly.
Has anybody else had this problem or any ideas why it is happening?
Cheers
Rob
Code:
$subject1 = str_replace("é", "=?UTF-8?Q?=E9?=", $subject);
$headers = "From: ".$addr_from."\r\n";
$headers .= "Subject: ".$subject1."\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=utf8\r\n";
return mail($to,$subject,$html,$headers);