stream_socket_enable_crypto() Error in php mailer

柔情痞子 提交于 2019-12-02 13:13:54

try

    $mail->smtpConnect = array(
        'ssl' => array(
        'verify_peer' => false,
        'verify_peer_name' => false,
        'allow_self_signed' => true
        )
    );

    $mail->SMTPSecure = false;
    $mail->SMTPAutoTLS = false;
Synchro

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!