Bonjour a tous !
J'ai besoin de vous, j'essaie d'envoyer un mail mais j'obtiens toujours une erreur:
la portion du code pour envoyer le mail est :( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: mail(): Failed to connect to mailserver at "smtp.bbox.fr" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\wamp\www\blog\contact.php on line 43
et la configuration du php.ini :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 if($validate){ $mail_to= 'suggadaddy@hotmail.fr'; $mail_Subject = "Une question depuis le blog :".htmlspecialchars($_POST['sujet']); $headers = "From :".$_POST['email']."\n"; $headers .="Reply-To: ".$_POST['email']."\n"; $headers .="MIME-Vsersion: 1.0 \n"; $headers .="Content-Transfer-Encoding: 8bit \n"; $headers .="Content-type: text/html; charset=utf-8 \n"; $mail_body = "Bonjour ,<br/> Un client vous a contacté deouis le site, Voici son message :<br/>".htmlspecialchars(nl2br($_POST['message'])); if(mail($mail_to,$mail_Subject,$mail_body,$headers)){ $_SESSION['message'] = "Votre émail a bien été envoye"; unset($_POST); }else{ $_SESSION['erreur'] = "Un problème est survenu lors de l'envoi de votre émailil."; } }
merci pour votre aide
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 [mail function] ; For Win32 only. SMTP = smtp.bbox.fr smtp_port = 25 ; For Win32 only. sendmail_from = <a href="mailto:suggadaddy@hotmail.com">suggadaddy@hotmail.com</a> ; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). ; <a href="http://php.net/sendmail-path" target="_blank">http://php.net/sendmail-path</a> ;sendmail_path = "C:\wamp\sendmail\sendmail.exe"







Répondre avec citation





Partager