j'ai beau chercher, j'ai un problème avec des caractères spéciaux dans un mail (mais pas tous ; la plupart sont bons
Le problème se situe dans le sujet du mail ; voici mon code :
Code : Tout sélectionner
$dest="---";
$sujet=$nom_officieux." sera ".$statut."(e) au match du ".$date;
$texte=$_POST['note'];
$nom=$nom_officieux;
$email="---";
$from="From: $nom<$email>\r\n";
$from.="Reply-To: $nom <$email>\n";
$from.= 'MIME-Version: 1.0' . "\r\n";
$from.= 'Content-type: text/plain; charset=utf8' . "\r\n";
function mail_utf8($to, $subject, $message , $header){
$header_ = 'MIME-Version: 1.0' . "\r\n" . 'Content-type: text/plain; charset=UTF-8' . "\r\n";
mail($to, "=?UTF-8?B?".base64_encode($subject).'?=', $message, $header_ . $header);
}
mail_utf8($dest,$sujet,$texte,$from);