j'ai le code suivantsmtp_error: Impossible de se connecter au serveur
phpinfo();
$mail = new PHPMailer();
$mail->IsSMTP(); // telling the class to use SMTP
$mail->SMTPSecure = "ssl";
$mail->Host = "smtp.gmail.com"; // SMTP server
$mail->Port = 465;
$mail->SMTPAuth = true;
$mail->Username= '[email protected]';
$mail->Password='xxx';
$mail->From = "[email protected]";
$mail->AddAddress("[email protected]");
$mail->Subject = "First PHPMailer Message";
$mail->Body = "Hi! \n\n This is my first e-mail sent through PHPMailer.";
$mail->WordWrap = 50;
if(!$mail->Send()) {
echo 'Message was not sent.';
echo 'Mailer error: ' . $mail->ErrorInfo;
} else {
echo 'Message has been sent.';
}
i permettent également "extension = php_openssl.dll" dans le fichier php.ini ..
mais encore son me donner un erreur,
Warning: fsockopen() [function.fsockopen]: unable to connect to ssl://smtp.gmail.com:465 (Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?)
Mailer error: SMTP Error: Could not connect to SMTP host.
si j'ai extension=php_openssl.dll
activé dans mon fichier php.ini, phpinfo(); montre que OpenSSL support:disabled (install ext/openssl)
. comment c'est possible?
Quelqu'un peut-il aider ??
semblable, cette aide :: http://stackoverflow.com/questions/10813048/error-unable-to-find-the-socket-transport- ssl-with-zend-mail –