1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
| <?php
$societe=$_POST['societe'];
$nom=$_POST['nom'];
$tel=$_POST['tel'];
$fax=$_POST['fax'];
$mail=$_POST['mail'];
$adresse=$_POST['adresse'];
$designation=$_POST['design'];
$format=$_POST['format'];
$quantite=$_POST['quantite'];
$page=$_POST['page'];
$couleur=$_POST['couleur'];
$papier=$_POST['papier'];
$gram=$_POST['gram'];
$facon=$_POST['facon'];
$fini=$_POST['fini'];
$delais=$_POST['delais'];
$obs=$_POST['obs'];
/////voici la version Mine
$headers = "MIME-Version: 1.0\r\n";
//////ici on détermine le mail en format text
$headers .= "Content-type: text/plain; charset=iso-8859-1\r\n";
////ici on détermine l'expediteur et l'adresse de réponse
$headers .= "From: $nom <$mail>\r\nReply-to : $nom <$mail>\nX-Mailer:PHP";
$subject="demande de devis";
$destinataire="kyrilys@aliceadsl.fr";
$body="Société : " . $_POST['societe']." , \n Nom : " . $_POST['nom']." , \n Téléphone : " . $_POST['tel']." , \n Fax : " . $_POST['fax']." , \n Mail : " . $_POST['mail']." , \n Adresse : " . $_POST['adresse'].", \n Désignation: " . $_POST['design']." , \n Format : " . $_POST['format']." , \n Quantité : " . $_POST['quantite']." , \n Nombre de page : " . $_POST['page']." , \n Couleur : " . $_POST['couleur']." , \n Type de papier : " . $_POST['papier']." , \n Grammage : " . $_POST['gram']." , \n Façonnage : " . $_POST['facon']." , \n Finition : " . $_POST['fini']." , \n Délais souhaités : " . $_POST['delais']." , \n Observations : " . $_POST['obs']."\n";
if (mail($destinataire,$subject,$body,$headers)) {
echo "Votre mail a été envoyé";
} else {
echo "Une erreur s'est produite \n '<a href="presentation.php">Retour</a>'";
}
?> |
Partager