Bonjour,
j'ai un formulaire de contact dont voilà le code:
fichier1.html
<FORM method="POST" action="do_sendform.php" >
<TR>
<TD vAlign=top noWrap width="40%"> </TD>
<TD vAlign=top noWrap width="40%"> Nom* :</TD>
<TD width="60%"><INPUT name="sender_name" ></TD>
</TR>
<TR>
<TD vAlign=top noWrap
width="40%"> </TD>
<TD vAlign=top noWrap width="40%"> Email* :</TD>
<TD width="60%"><input name="sender_email"></TD>
</TR>
<TR>
<TD vAlign=top noWrap width="40%"> </TD>
<TD vAlign=top noWrap width="40%"> Commentaire* :</TD>
<TD width="60%"><textarea name="message" rows=4 cols=26></textarea></TD>
</TR>
<TR>
<TD vAlign=bottom noWrap> </TD>
<TD vAlign=bottom noWrap>(*) Champs obligatoires</TD>
<TD>
<input value="Envoyer" name="submit" width="100" type="submit" style="color:#800000;font:bolder" onClick="var resultat = CheckForm(this.form); return resultat;">
</TD>
</TR>
</form>
fichier2:do_sendform.php
<?php
$msg = "Sender Name:\t$sender_name\n";
$msg .= "Sender E-Mail:\t$sender_email\n";
$msg .= "Message:\t$message\n\n";
$recipient = "mon_email@gmail.com";
$subject = "Web Site Feedback";
$mailheaders = "From: My Web Site <> \n";
$mailheaders .= "Reply-To: $sender_email\n\n";
if(mail($recipient, $subject, $msg, $mailheaders)) {
?>
si je valide ce formulaire, j'ai ce problème:
Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\chemin\do_sendform.php on line 14
j'ai beau essayé de chercher sur le web, et j'ai meme fouillé pas mal de fois dans les fichiers:
C:\AppServ\php5\php.ini-recommended et C:\AppServ\Apache2.2\conf\httpd.conf
mais en vain.
N.B:
j'utilise Appserv Version 2.1 comme serveur web.
je fais partie d'un réseau d'entreprise et j'ai accés à Internet, mais on a pas de nom de domaine, je fais ces essais en localhost pour le moment.
Mille Merci.
