i have Used PHP 5.3 and i have tried to send mail using php mailer LIBRARY.. but i got Error
Warning: stream_socket_enable_crypto() [streams.crypto]: this stream does not support SSL/crypto in D:\xampp\htdocs\mail_check\mail\class.smtp.php on line 313 Mailer Error: SMTP connect() failed.
$sendfrm_name = "xxxx";
$sendfrm_id = "ddsdsd@gmail.com";
$sendtoname = 'yyyy';
$sendto = 'yyyyyy@gmail.com';
$cc = '';
include("mail/PHPMailerAutoload.php");
include("mail/class.PHPMailer.php");
include("mail/class.smtp.php");
$mail = new PHPMailer;
$mail-> isSMTP();
$mail-> Host = 'smtp.gmail.com';
$mail-> SMTPAuth = true;
$mail->smtpConnect = array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
)
);
$mail-> Username = 'fffffff@gmail.com';
$mail-> Password = 'ekdbaffdfba..';
$mail-> SMTPSecure = 'tls';
$mail-> Port = 587; //587
$mail-> setFrom($sendfrm_id, $sendfrm_name);
$mail-> addAddress($sendto, $sendtoname);
$mail-> addReplyTo($sendto, $sendtoname);
//$mail->addCC($cc);
$mail->WordWrap = 50;
$mail->isHTML(true);
$mail->Subject = "Test Mail";
$mail->Body = "Name: ".$sendfrm_name ."<br /> Email: ".$sendfrm_id;
if(!$mail->send())
{
echo "Mailer Error: ".$mail->ErrorInfo;
}
else
{
echo "1";
}
I got Error Warning: stream_socket_enable_crypto() [streams.crypto]: this stream does not support SSL/crypto in D:\xampp\htdocs\mail_check\mail\class.smtp.php on line 313
Mailer Error: SMTP connect() failed.
How to fix this Error?