Je récupère les données d'un formulaire avec un fichier PHP, celui-ci envoi un mail et génère un fichier csv
du moins jusqu'à hier
tout cela fonctionnait parfaitement mais depuis hier je ne reçois plus les mails par contre le fichier csv lui se remplit bien
le site est hébergé chez ovh et je me demande si ce n'est pas ça le pb
voici mon code :
<?php
session_start();
/* Simple order form script
Uses $_POST variables: numero
**/
$numero = htmlspecialchars($_POST['numero']);
/* You can edit the templates below to customize reservation emails. Remember to change $mail_address to your email address. */
$mail_subject = "Rappel Clients (".$_SESSION['utm_source'].")";
$mail_content = "Rappel automatique \r\n \r\n
Numéro a rappeler : ".$numero."\r\n";
$mail_address = "monEmail"; /* Your email **/
$mail_content = wordwrap($mail_content, 70, "\r\n");
$headers = 'X-Mailer: PHP/'.phpversion();
mail($mail_address, $mail_subject, $mail_content, $headers);
$dt = date("ym");
$dt2 = date("d/m/y H:i");
if (!file_exists("Files/Rappel-Clients-".$dt.".csv" )) {
// le fichier n'existe pas
$fd = fopen("Files/Rappel-Clients-".$dt.".csv","x+");
fwrite($fd,'Date');
fwrite($fd,";");
fwrite($fd,'Source');
fwrite($fd,";");
fwrite($fd,'Telephone');
fwrite($fd,";");
fwrite($fd,"\n"); //A LA FIN ON BOUGE PAS
} else {
// le fichier existe
$fd = fopen("Files/Rappel-Clients-".$dt.".csv","a+");
}
fwrite($fd,$dt2);
fwrite($fd,";");
fwrite($fd,$_SESSION['utm_source']);
fwrite($fd,";");
fwrite($fd,$numero);
fwrite($fd,";");
fwrite($fd,"\n"); //A LA FIN ON BOUGE PAS
fclose($fd);
header('Location:/index.php');
?>