iman suhan
asked on
Message could not be sent.Mailer Error: Extension missing: openssl
Message could not be sent.Mailer Error: Extension missing: openssl
1);extension=php_openssl.d ll been changed to extension=php_openssl.dll in php.in in both apache and php.
2);extension_dir = "ext" has been changed from extension_dir = "ext"
3)i have restart the wamp server
4)i am using PHP 5.6.25 and added composer to same versionPHP 5.6.25
5) i have C:\wamp\bin\php\php5.6.25\ extras\ssl \openssl.c nf i checked for the variable OPENSSL_CONFi dint have any variable i dont know What to add System variable: OPENSSL_CONF
SOURCE:How to enable PHP's openssl extension to install Composer?
<?php
if (isset($_POST))
{
require_once('class.phpmai ler.php');
require_once('class.smtp.p hp');
require 'PHPMailer/PHPMailerAutolo ad.php';
$mail = new PHPMailer();
$mail->SMTPDebug = 0; // Enable verbose deb
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = 'smtp.gmail.com'; // Specify main and backup SMTP servers
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = 'eiman.sadath.assadi@gmail .com'; // SMTP username
$mail->Password = 'siliconia'; // SMTP password
$mail->SMTPSecure = 'tls'; // Enable TLS 'tls'encryption, `ssl` also accepted
$mail->Port = 587; // TCP port to connect to or 587 o
$mail->setFrom('myaccount@ gmail.com' );
$mail->addAddress('myaccou nt1@gmail. com', 'user1'); // Add a recipient
$mail->addAddress('eiman.s uhan@gmail .com'); // Name is optional
//$mail->addReplyTo('info@ example.co m', 'Information');
//$mail->addCC('cc@example .com');
//$mail->addBCC('bcc@examp le.com');
//mail->addAttachment('/va r/tmp/file .tar.gz'); // Add attachments
//$mail->addAttachment('/t mp/image.j pg', 'new.jpg'); // Optional name
$mail->isHTML(true); // Set email format to HTML
$mail->Subject = 'Registration Form';
$mail->Body = 'This body <b>in bold!</b>';
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
if(!$mail->send()) {
echo 'Message could not be sent.';
echo 'Mailer Error: ' . $mail->ErrorInfo;
} else {
echo 'Message has been sent';
}
}
?>
1);extension=php_openssl.d
2);extension_dir = "ext" has been changed from extension_dir = "ext"
3)i have restart the wamp server
4)i am using PHP 5.6.25 and added composer to same versionPHP 5.6.25
5) i have C:\wamp\bin\php\php5.6.25\
SOURCE:How to enable PHP's openssl extension to install Composer?
<?php
if (isset($_POST))
{
require_once('class.phpmai
require_once('class.smtp.p
require 'PHPMailer/PHPMailerAutolo
$mail = new PHPMailer();
$mail->SMTPDebug = 0; // Enable verbose deb
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = 'smtp.gmail.com'; // Specify main and backup SMTP servers
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = 'eiman.sadath.assadi@gmail
$mail->Password = 'siliconia'; // SMTP password
$mail->SMTPSecure = 'tls'; // Enable TLS 'tls'encryption, `ssl` also accepted
$mail->Port = 587; // TCP port to connect to or 587 o
$mail->setFrom('myaccount@
$mail->addAddress('myaccou
$mail->addAddress('eiman.s
//$mail->addReplyTo('info@
//$mail->addCC('cc@example
//$mail->addBCC('bcc@examp
//mail->addAttachment('/va
//$mail->addAttachment('/t
$mail->isHTML(true); // Set email format to HTML
$mail->Subject = 'Registration Form';
$mail->Body = 'This body <b>in bold!</b>';
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
if(!$mail->send()) {
echo 'Message could not be sent.';
echo 'Mailer Error: ' . $mail->ErrorInfo;
} else {
echo 'Message has been sent';
}
}
?>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
stale question
ASKER
how do i close this question ??