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 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
|
<?php
// *** A configurer
$to = "maboite@gmail.com";
// adresse MAIL OVH de lhébergement.
$from = "monsite@hosting.ovh.net";
ini_set("SMTP", "smtp.monsite.com"); // Pour les hébergements mutualisés Windows de OVH
// *** Laisser tel quel
$JOUR = date("Y-m-d");
$HEURE = date("H:i");
$Subject = "Contact site ECMTD - $JOUR $HEURE";
$mail_Data = "";
$mail_Data .= "<html> \n";
$mail_Data .= "<head> \n";
$mail_Data .= "<title> Subject </title> \n";
$mail_Data .= "</head> \n";
$mail_Data .= "<body> \n";
$mail_Data .= "<br> \n";
$mail_Data .= "<p>un message <font color=red> bla </font> bla </p><br> \n";
//$mail_Data .= "Etc.<br> \n";
$mail_Data .= "</body> \n";
$mail_Data .= "</HTML> \n";
$headers = "MIME-Version: 1.0 \n";
$headers .= "Content-type: text/html; charset=iso-8859-1 \n";
$headers .= "From: $from \n";
$headers .= "Disposition-Notification-To: $from \n";
// Message de Priorité haute
// -------------------------
$headers .= "X-Priority: 1 \n";
$headers .= "X-MSMail-Priority: High \n";
$CR_Mail = TRUE;
$CR_Mail = @mail ($to, $Subject, $mail_Data, $headers);
if ($CR_Mail === FALSE)
{
echo " ### CR_Mail=$CR_Mail - Erreur g envoi mail <br> \n";
}
else
{
echo " *** CR_Mail=$CR_Mail - Mail g envoyé<br> \n";
}
?>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/contactform.css">
<title>Formulaire de contact</title>
</head>
<body>
<div class="boite" style="">
<div style="margin-bottom:15px;color:white;font-size:20px;text-align:center;"><?= "$CR_Mail - Votre message a été envoyé à ECMTD.<br> Nous vous répondrons dans les plus brefs délais." ?></div>
<br>
<div class="container">
<div class="titre">Contacter ECMTD</div>
<h5></h5>
<form action="" method="post" id="form-box">
<div>
<span>
<i class="fas fa-user"></i>
</span>
</div>
<span class="etiq">
Nom <font color=red>*</font><br>
</span>
<input type="text" class="champtext" name="name" id="name" placeholder="Votre nom ou le nom de votre société" required>
<br><br>
<span class="etiq">
Prénom <br>
</span>
<input type="text" name="firstname" id="firstname" class="champtext" placeholder="Votre prénom"><br><br>
<span class="etiq">
E-mail <font color=red>*</font><br>
</span>
<input type="email" name="email" id="email" class="champtext" placeholder="Votre email" required><br><br>
<span class="etiq">
N° téléphone <font color=red>*</font><br>
</span>
<input type="text" name="phone" id="phone" class="champtext" placeholder="Votre numéro de téléphone" required><br><br>
<span class="etiq">
Message <font color=red>*</font><br>
</span>
<textarea class="champarea" name="message" id="message" placeholder="Votre message" required></textarea>
<div class="pied">
<input class="bouton" type="submit" name="envoi" id="envoi" value="Envoyer">
<input class="bouton" type="reset" name="annul" id="annul" value="Annuler">
</div>
</form>
</div>
</div>
</body>
</html> |