ユーザー登録時に確認メールを送信したい。私はxamppを使用しています。PHP ファイルを実行すると、次のエラーが返されます。
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?) in C:\xampp\htdocs\class.smtp.php on line 122
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?) in C:\xampp\htdocs\class.smtp.php on line 122
Message has not been sent.
私のphpファイルの関連部分:
try
{
require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->Mailer = "smtp";
$mail->SMTPSecure = "ssl";
$mail->Host = "ssl://smtp.gmail.com";
$mail->Port = 465;
$mail->SMTPAuth = true;
$mail->CharSet="utf-8";
$mail->Username = "user@gmail.com";
$mail->Password = "password";
$mail->From = "user@gmail.com";
$mail->FromName="DBE Yazılım";
$mail->AddAddress($_POST['UserMail']);
$mail->Subject = "Registration Information";
$mail->Body = "Hello your password is " . $userpass;
//$mail->AddAttachment($path);
$mail->Send();
if($mail->Send())
echo 'Message has been sent.';
else
echo 'Message has not been sent.';
}
catch(Exception $e)
{
echo 'hata'.$e->getMessage();
}
フォーラムを確認しましたが、このエラーは一般的に ssl に関するものです。extension=php_openssl.dll
彼らはそれをphp.iniに追加する必要があると言います。この部分を追加しましたが、何も変わりませんでした。これはxamppについてですか?
前もって感謝します。