Beheben Sie den Fehler "PHPMailer Error: Extension fehlt: openssl"

Habe ich entfernt ; für openssl von php.ini in php sowie apache-Ordner. Ich bekomme immer noch die Fehlermeldung "PHPMailer Error: Extension fehlt: openssl" im folgenden wird Der php-code und ich habe setup phpmailerautoload zu.

PHP-CODE:

<?php
require "PHPMailerAutoload.php";
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->Mailer = 'smtp';
$mail->SMTPAuth = true;
$mail->Host = 'smtp.gmail.com'; //"ssl://smtp.gmail.com" didn't worked
$mail->Port = 465;
$mail->SMTPSecure = 'ssl';
//or try these settings (worked on XAMPP and WAMP):
/*$mail->Port = 587;
$mail->SMTPSecure = 'tls';*/


$mail->Username = "vignesh*******[email protected]";
$mail->Password = "********";

$mail->IsHTML(true); //if you are going to send HTML formatted emails
$mail->SingleTo = true; //if you want to send a same email to multiple users. multiple emails will be sent one-by-one.

$mail->From = "vignesh*******[email protected]";
$mail->FromName = "Vignesh";

$mail->addAddress("vignesh*******[email protected]","User 1");

//$mail->addCC("[email protected]","User 3");
//$mail->addBCC("[email protected]","User 4");

$mail->Subject = "Testing PHPMailer with localhost";
$mail->Body = "Hi,<br /><br />This system is working perfectly.";

if(!$mail->Send())
    echo "Message was not sent <br />PHPMailer Error: " . $mail->ErrorInfo;
else
    echo "Message has been sent";
?>

Bitte helfen Sie mir bei der Behebung des Fehlers. Ich habe aktiviert openssl in wampserver zu.

  • Die Fehlermeldung sagt, dass Sie fehlen die openssl-Erweiterung... hast du das überprüfen? aka, hast du das Bearbeiten der richtigen ini-Dateien?
  • Prüfen Sie auch hier, könnte es einige Hinweise: stackoverflow.com/questions/3477766/...
  • Bearbeiten von php.ini-Datei, entfernen Sie das";" am ";extension=php_openssl.dll"
Schreibe einen Kommentar