<form name=form_coordonnees" method=POST action=sendmail2.php>
Je voudrais recevoir les donées sur mon email , pour cela j'utilise phpmailer , voici le sender sendmail2.:<?php
include_once("class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->SMTPAuth = true;
$mail->Host = "smtp.gmail.com";
$mail->SMTPSecure = "ssl";
$mail->Port = 465;
$mail->Username = "[email protected]";
$mail->Password = "mypass";
$mail->AddAddress("[email protected]");
$mail->From = "[email protected]";
$mail->FromName = $_POST['name'];
$mail->Subject = "User Comment";
$mail->IsHTML(true);
$mail->Body = $_POST['comments']. ' name: '. $_POST['name']. 'email: ' .$_POST['email'];
if($mail->Send()) {
echo "Message sent! Thanks for your comments!";
}
?>
aprés avoir remplis le form ; le sendmail2 m'affiche ça "SMTP Error: Could not connect to SMTP host"
En manipulant les ports et les serveurs smtp , j'arrive au pire , à avoir une page blanche sans rien ,je suis hébergé sur hostinger . Que faire ?