1 2 3 4 5 6 7 8 9 10 11 12 13 14
| $destinataire = "mail@free.fr";
$expediteur = $_POST['email'];
$reponse = $expediteur;
echo "Ce script envoie un mail au format HTML à $destinataire";
$codehtml = "nom : ".$_POST['nom'];
$codehtml .= "<br />email : ".$_POST['email'];
$codehtml .= "<br /><br />sujet : ".$_POST['titre'];
$codehtml .= "<br />".$_POST['commentaires'];
$codehtml .=
"<html><body><br />" .
"› <a href=\"mailto:".$_POST['email']."\">répondre à ". $_POST['nom']."</a>" .
"</body></html>";
mail($destinataire, "demande d'infos", $codehtml, "From: $expediteur\r\nReply-To: $reponse\r\nContent-Type: text/html; charset=\"iso-8859-1\"\r\n"); |
Partager