Hello,
J'ai essayé de rajouter un " utf8_decode() mais cela me donnait des ??? à la place des lettres avec accents.
J'ai trouvé une autre solution. Le faire en HTML. C'est compatible avec outlook, hotmail et iphone.
<?php header( 'content-type: text/html; charset=utf-8' );
$actif = $_POST['actif'];
$nom = $_POST['nom'];
$prenom = $_POST['prenom'];
$adresse = $_POST['adresse'];
$npa = $_POST['npa'];
$localite= $_POST['localite'];
$pays = $_POST['pays'];
$tel = $_POST['tel'];
$nat = $_POST['nat'];
$ne = $_POST['ne'];
$fax = $_POST['fax'];
$email = $_POST['email'];
$brevet = $_POST['brevet'];
$numero = $_POST['numero'];
$profes = $_POST['profes'];
$type = $_POST['type'];
// Plusieurs destinataires
$to = '[email protected]' ; // notez la virgule
// Sujet
$subject = " Inscription d'un nouveau membre du club";
// message
$message = '
<html>
<head>
<title>Calendrier des anniversaires pour Août</title>
</head>
<body>
<p>Les coordonnées du nouveau membre.</p>
<table align="left">
<tr align="left"><th width="100">Membre:</th><td>'.$actif.' </td></tr>
<tr align="left"><th >Nom:</th><td>'.$nom.' </td></tr>
<tr align="left"><th >Prénom:</th><td>'.$prenom.'</td></tr>
<tr align="left"><th >Adresse:</th><td>'.$adresse.'</td></tr>
<tr align="left"><th >NPA:</th><td>'.$npa.'</td></tr>
<tr align="left"><th >Ville:</th><td>'.$localite.'</td></tr>
<tr align="left"><th >Pays:</th><td>'.$pays.'</td></tr>
<tr align="left"><th >Téléphone:</th><td>'.$tel.'</td></tr>
<tr align="left"><th >Portable:</th><td>'.$nat.'</td></tr>
<tr align="left"><th >Date de naissance:</th><td>'.$ne.'</td></tr>
<tr align="left"><th >Fax:</th><td>'.$fax.'</td></tr>
<tr align="left"><th >E-mail:</th><td>'.$email.'</td></tr>
<tr align="left"><th >Date Brevet:</th><td>'.$brevet.'</td></tr>
<tr align="left"><th >Numéro du Brevet:</th><td>'.$numero.'</td></tr>
<tr align="left"><th >Profession:</th><td>'.$profes.'</td></tr>
<tr align="left"><th >Type:</th><td>'.$type.'</td></tr>
</table>
</body>
</html>
';
// Pour envoyer un mail HTML, l'en-tête Content-type doit être défini
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
// En-têtes additionnels
$headers .= 'From:'. $email.'' . "\r\n";
// Envoi
mail($to, $subject, $message, $headers);
header("location:confirmation.php");
?>
Maintenant quand je regarde mon e-mail avec n'importe quel programme il n'y a plus de problème. Merci encore pour votre aide.
Hello,
J'ai essayé de rajouter un " utf8_decode() mais cela me donnait des ??? à la place des lettres avec accents.
J'ai trouvé une autre solution. Le faire en HTML. C'est compatible avec outlook, hotmail et iphone.
[php]
<?php header( 'content-type: text/html; charset=utf-8' );
$actif = $_POST['actif'];
$nom = $_POST['nom'];
$prenom = $_POST['prenom'];
$adresse = $_POST['adresse'];
$npa = $_POST['npa'];
$localite= $_POST['localite'];
$pays = $_POST['pays'];
$tel = $_POST['tel'];
$nat = $_POST['nat'];
$ne = $_POST['ne'];
$fax = $_POST['fax'];
$email = $_POST['email'];
$brevet = $_POST['brevet'];
$numero = $_POST['numero'];
$profes = $_POST['profes'];
$type = $_POST['type'];
// Plusieurs destinataires
$to = '
[email protected]' ; // notez la virgule
// Sujet
$subject = " Inscription d'un nouveau membre du club";
// message
$message = '
<html>
<head>
<title>Calendrier des anniversaires pour Août</title>
</head>
<body>
<p>Les coordonnées du nouveau membre.</p>
<table align="left">
<tr align="left"><th width="100">Membre:</th><td>'.$actif.' </td></tr>
<tr align="left"><th >Nom:</th><td>'.$nom.' </td></tr>
<tr align="left"><th >Prénom:</th><td>'.$prenom.'</td></tr>
<tr align="left"><th >Adresse:</th><td>'.$adresse.'</td></tr>
<tr align="left"><th >NPA:</th><td>'.$npa.'</td></tr>
<tr align="left"><th >Ville:</th><td>'.$localite.'</td></tr>
<tr align="left"><th >Pays:</th><td>'.$pays.'</td></tr>
<tr align="left"><th >Téléphone:</th><td>'.$tel.'</td></tr>
<tr align="left"><th >Portable:</th><td>'.$nat.'</td></tr>
<tr align="left"><th >Date de naissance:</th><td>'.$ne.'</td></tr>
<tr align="left"><th >Fax:</th><td>'.$fax.'</td></tr>
<tr align="left"><th >E-mail:</th><td>'.$email.'</td></tr>
<tr align="left"><th >Date Brevet:</th><td>'.$brevet.'</td></tr>
<tr align="left"><th >Numéro du Brevet:</th><td>'.$numero.'</td></tr>
<tr align="left"><th >Profession:</th><td>'.$profes.'</td></tr>
<tr align="left"><th >Type:</th><td>'.$type.'</td></tr>
</table>
</body>
</html>
';
// Pour envoyer un mail HTML, l'en-tête Content-type doit être défini
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
// En-têtes additionnels
$headers .= 'From:'. $email.'' . "\r\n";
// Envoi
mail($to, $subject, $message, $headers);
header("location:confirmation.php");
?>[/php]
Maintenant quand je regarde mon e-mail avec n'importe quel programme il n'y a plus de problème. Merci encore pour votre aide.