stream_socket_enable_crypto() Error in php mailer

前端 未结 2 980
独厮守ぢ
独厮守ぢ 2021-01-28 00:40

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]: thi

相关标签:
2条回答
  • 2021-01-28 00:59

    try

        $mail->smtpConnect = array(
            'ssl' => array(
            'verify_peer' => false,
            'verify_peer_name' => false,
            'allow_self_signed' => true
            )
        );
    
        $mail->SMTPSecure = false;
        $mail->SMTPAutoTLS = false;
    
    0 讨论(0)
  • 2021-01-28 01:09

    Your PHP installation is missing the SSL extension that allows TLS encryption on streams like this. There are similar questions that have answers to that, such as this one.

    You should not be writing any new code for PHP 5.3 - it's no longer supported and may have security holes; updating may give you the wrappers you're missing anyway.

    It won't necessarily affect this particular issue, but you've based your code on an obsolete example, and are not loading the PHPMailer classes as the documentation tells you to - make sure you're using the latest version and base your code on the gmail example provided with PHPMailer.

    0 讨论(0)
提交回复
热议问题