Problème boite mail en php
Pitus38
-
graffx Messages postés 6506 Date d'inscription Statut Contributeur Dernière intervention -
graffx Messages postés 6506 Date d'inscription Statut Contributeur Dernière intervention -
Bonjour, a tous le monde, j'ai un problème je vous explique:
J'ai voulut créer un site web et donc j'ai téléchargé un kit graphique. Jusque là tous va bien... =)
Seulement à l'interieur il y a un "formulaire" qui permet d'envoyer des mails mais je n'arrive pas a le faire fonctionner (si vous pouriez m'ader a le faire fonctionner merci) il m'indique 2 érreurs lorsque je clique sur "envoyer":
-Warning: 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:\program files\easyphp1-8\www\scripts\email.php on line 13
-Warning: Cannot modify header information - headers already sent by (output started at c:\program files\easyphp1-8\www\scripts\email.php:13) in c:\program files\easyphp1-8\www\scripts\email.php on line 16
voici le code du fichier php:
<?php
require("config.inc.php");
if(isset($_POST['email']) && isset($_POST['nom']) && isset($_POST['commentaires'])) {
$headers = "From: ".$_POST['nom']."<".$_POST['email'].">\r\n";
$headers .= "X-Sender: ".$_POST['email']."\r\n";
$headers .= "X-Mailer: PHP/".phpversion()."\r\n";
$headers .= "X-Priority: 2\r\n";
$headers .= "Return-Path: ".$_POST['email']."\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/plain; charset=\"US-ASCII\"\r\n";
$headers .= "Content-Transfer-Encoding: 7bit\r\n";
if(mail($to, $titre, $_POST['commentaires'], $headers)) {
header("Location:../".$lienOK);
} else {
header("Location:../".$lienPasOK);
}
} else {
header("Location:../".$lienPasOK);
}
?>
Je suis un novice en programation donc svp parlez moi en "francais" :lol:
Merci d'avance ;)
J'ai voulut créer un site web et donc j'ai téléchargé un kit graphique. Jusque là tous va bien... =)
Seulement à l'interieur il y a un "formulaire" qui permet d'envoyer des mails mais je n'arrive pas a le faire fonctionner (si vous pouriez m'ader a le faire fonctionner merci) il m'indique 2 érreurs lorsque je clique sur "envoyer":
-Warning: 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:\program files\easyphp1-8\www\scripts\email.php on line 13
-Warning: Cannot modify header information - headers already sent by (output started at c:\program files\easyphp1-8\www\scripts\email.php:13) in c:\program files\easyphp1-8\www\scripts\email.php on line 16
voici le code du fichier php:
<?php
require("config.inc.php");
if(isset($_POST['email']) && isset($_POST['nom']) && isset($_POST['commentaires'])) {
$headers = "From: ".$_POST['nom']."<".$_POST['email'].">\r\n";
$headers .= "X-Sender: ".$_POST['email']."\r\n";
$headers .= "X-Mailer: PHP/".phpversion()."\r\n";
$headers .= "X-Priority: 2\r\n";
$headers .= "Return-Path: ".$_POST['email']."\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/plain; charset=\"US-ASCII\"\r\n";
$headers .= "Content-Transfer-Encoding: 7bit\r\n";
if(mail($to, $titre, $_POST['commentaires'], $headers)) {
header("Location:../".$lienOK);
} else {
header("Location:../".$lienPasOK);
}
} else {
header("Location:../".$lienPasOK);
}
?>
Je suis un novice en programation donc svp parlez moi en "francais" :lol:
Merci d'avance ;)
A voir également:
- Problème boite mail en php
- Boîte mail française gratuite - Guide
- Je n'ai plus acces a ma boite mail gmail - Guide
- Boite gmail saturée - Guide
- Se connecter à ma boite hotmail - Guide
- Creer boite mail hotmail - Guide