Bonjour à tous,
J'ai un soucis avec mon form2mail.
Il fonctionnait bien quand j'étais chez online, maintenant que je suis chez phpnet, l'appli fonctionne bien mais, l'envoyeur est [email protected] au lieu de [email protected]
Voici mon code, kelkun pourrait m'aider et me le corriger?
Un grand merci
<?php
$dest="[email protected]";
$referer= getenv("HTTP_REFERER");
$ok=1;
if($ok){
$sujet= "Mail depuis mon site!";
//$body.="Page d'origine : $referer\n";
$body.="Site d'origine : www.monsite.net";
$body.=" \n";
$body.="\n*** Demande d'informations ***\n";
$body.=" \n";
if(count($HTTP_POST_VARS)){
while (list($key, $val) = each($HTTP_POST_VARS)){
$body.="$key : $val\n";
}
}
if(count($HTTP_GET_VARS)){
while (list($key, $val) = each($HTTP_GET_VARS)){
$body.="$key : $val\n";
}
}
$body.="*************************\n";
if(!mail("[email protected]",$dest,$sujet,$body)){
print "erreur envoi email <br>";
}
// affiche le html qui suit si succes
?>
<html>
<head>
<title>Monsite</title>
<meta http-equiv="refresh" content="5;URL=../index.html">
</head>
<body bgcolor="#FFFFCC">
<script type="text/javascript" src="codagemail.js"></script>
<h1 align="center"> </h1>
<h1 align="center"><font color="#003366">MERCI</font></h1>
<div align="center"><font color="#003366"><i><font size="4">Votre demande est
envoyée elle sera traitée dans les plus brefs délais<br>
</font></i></font><br>
<br>
<font color="#003366"><i>Veuillez patienter nous vous redirigeons...</i></font></div>
</body>
</html>
<?php
}
else{
?>
<html>
<head><title>Monsite</title></head>
<body bgcolor="#FFFFCC">
<h1 align="center"><font color="#003366">DESOLE</font></h1>
<div align="center"><font color="#003366"><i><font size="4">notre serveur est en maintenance</font></i></font><br>
<br>
<br>
<br>
Veuillez réessayer plus tard</div>
</body>
</html>
<?php
}
?>