-1

help me : I am not send mail using phpmailer + php 5.6 . How to fix mail ?

error alert

SERVER -> CLIENT: 220 mx.google.com ESMTP ru8sm9096361pbb.20 - gsmtp CLIENT -> SERVER: EHLO php.local SERVER -> CLIENT: 250-mx.google.com at your service, [1.55.98.150]250-SIZE 35882577250-8BITMIME250-STARTTLS250-ENHANCEDSTATUSCODES250-PIPELINING250 SMTPUTF8 CLIENT -> SERVER: STARTTLS SERVER -> CLIENT: 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 D:\www\PHP\mail\PHPMailer-master\class.smtp.php on line 338 CLIENT -> SERVER: QUIT

SMTP connect() failed. Mailer Error: SMTP connect() failed.

Saifur
  • 16,081
  • 6
  • 49
  • 73
  • possible duplicate of [PHPMailer - SSL3\_GET\_SERVER\_CERTIFICATE:certificate verify failed](http://stackoverflow.com/questions/26827192/phpmailer-ssl3-get-server-certificatecertificate-verify-failed) – h2ooooooo Feb 26 '15 at 07:13

1 Answers1

0

You need to read the docs.

PHP 5.6 introduces SSL certificate verification, so if your config is broken, it will fail with this error. You should fix your SSL, but you can revert to the old behaviour by overriding PHPmailer and passing these options to the smtpConnect function:

$options = array(
    'ssl' => array(
        'verify_peer' => false,
        'verify_peer_name' => false,
        'allow_self_signed' => true
    )
);
Synchro
  • 35,538
  • 15
  • 81
  • 104