My contact form was working, and now, out of nowhere, I cannot receive the messages that are being sent from it.
Here's my PHP code for the form :
if($_POST){
$to = "MY EMAIL HERE";
$subject = "Formulaire de contact - Orizon Ventes FRANÇAIS";
$message = "<h2>$subject</h2>
<b>Nom:</b> $_POST[nom]<br/>
<b>Courriel:</b> $_POST[courriel]<br/>
<b>Telephone:</b> $_POST[phone]<br/>
<b>Message:</b> $_POST[message]<br/>";
$merci = "Merci! Votre message a bien été envoyé.";
// if($_POST[nom]==""){$err .= "Le champ \"NOM\" ne peut pas être vide<br/>";}
// if($_POST[email]==""){$err .= "Le champ \"EMAIL\" doit être sélectionné<br/>";}
// if($_POST[message]==""){$err .= "Le champ \"MESSAGE\" ne peut pas être vide<br/>";}
//if( $_SESSION['security_code'] != $_POST['security_code'] && $_SESSION['security_code'] !="" ) { $err .= "Le champ \"CODE DE SÉCURITÉ\" n'est pas valide<br>"; }
if($err==""){
$headers = "MIME-Version: 1.0\n" ;
$headers .= "Content-Type: text/html; charset=\"utf-8\"\n";
$headers .= "De: $_POST[nom]\n";
$headers .= "To: $to\n";
$headers .= "X-Priority: 1 (Higuest)\n";
$headers .= "X-MSMail-Priority: High\n";
$headers .= "Importance: High\n";
$status = mail($to, $subject, $message, $headers);
echo "<div class='thanks'>".$merci."<br/><br/></div>";
unset($_POST);
}
}
if($err!=""){
echo "<div class='erreur'>".$err."<br/><br/></div>";
}
?>
When I click the send button, I get the success message, but I'm not receiving the message on my email. 1 - Is there a way to retrieve these sent messages? 2 - How to fix this?
Thanks a lot!