SMTP -> FROM SERVER:220 smtp.gmail.com ESMTP dz12sm5952796pac.2 - gsmtp
SMTP -> FROM SERVER: 250-smtp.gmail.com at your service, [58.8.74.64] 250-SIZE 35882577 250-8BITMIME 250-STARTTLS 250-ENHANCEDSTATUSCODES 250-PIPELINING 250 SMTPUTF8
SMTP -> FROM SERVER:220 2.0.0 Ready to start TLS
Warning: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in IIIIIIIIIIIII\app\email\PHPMailer_v5.0.2\class.smtp.php on line 197
SMTP -> FROM SERVER:KGAxf�t�7S�h^�H�(p��Ɲ�*��Kס7�ۄ@S�\�<��ح����Dg���Ӽ���p��-%�e��̟)�qZ��J�iA0���M�Ly����C{��YXۑ���TPw�{@ԁ��nZ����M�҂�)bC�ǚ�U4g��*"�������ԛ�ɉV6{��_����rrv��_�g�P�T��M��g+jX�n:E�q�O��Z���n�&��&|��A���P_���Qz8�>
SMTP -> ERROR: RSET failed: KGAxf�t�7S�h^�H�(p��Ɲ�*��Kס7�ۄ@S�\�<��ح����Dg���Ӽ���p��-%�e��̟)�qZ��J�iA0���M�Ly����C{��YXۑ���TPw�{@ԁ��nZ����M�҂�)bC�ǚ�U4g��*"�������ԛ�ɉV6{��_����rrv��_�g�P�T��M��g+jX�n:E�q�O��Z���n�&��&|��A���P_���Qz8�>
Language string failed to load: tls
Message could not be sent.
Mailer Error : Language string failed to load: tls
SMTP server error: KGAxf�t�7S�h^�H�(p��Ɲ�*��Kס7�ۄ@S�\�<��ح����Dg���Ӽ���p��-%�e��̟)�qZ��J�iA0���M�Ly����C{��YXۑ���TPw�{@ԁ��nZ����M�҂�)bC�ǚ�U4g��*"�������ԛ�ɉV6{��_����rrv��_�g�P�T��M��g+jX�n:E�q�O��Z���n�&��&|��A���P_���Qz8�>
mail.php
<?php
date_default_timezone_set('Asia/Bangkok');
require '../app/email/PHPMailer_v5.0.2/class.phpmailer.php';
$mail = new PHPMailer();
$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host = "smtp.gmail.com";
$mail->SMTPDebug = 2; // enables SMTP debug information (for testing)
$mail->CharSet = "utf-8";
$mail->Port = 587;
//$mail->Port = 465;
//$mail->SMTPSecure = "ssl";
$mail->SMTPSecure = 'tls';
$mail->SMTPAuth = true;
$mail->Username = "[email protected]";
$mail->Password = "xxx";
$mail->setFrom('[email protected]','vvv');
$mail->addAddress('[email protected]','ccc');
$mail->Subject = "Test mail From xxx";
$mail->MsgHTML("xxxxxxxxxx");
if(!$mail->send()){
echo '<br/>';
echo '<br/> Message could not be sent. ';
echo '<br/> <b>Mailer Error</b> : ' . $mail->ErrorInfo;
}else{
echo "<br/> success mail sender";
}
?>