当前位置:首页 > 技术 > 正文内容

Z-blog在阿里云虚拟主机上无法使用STMP发邮件问题解决办法

Lavfun2年前 (2023-03-03)技术755

首先,确保阿里云虚拟主机管理后台的“PHP函数fsockopen设置”是开启状态:

20230303162839.png

然后前往找到文件:/zb_users/theme/tpure/plugin/phpmailer/smtp.php,将下列代码注释掉:

$this->smtp_conn = stream_socket_client("{$host}:{$port}", $errno, $errstr, $tval, STREAM_CLIENT_CONNECT, $context);

再将下列代码取消注释:

        $this->smtp_conn = @fsockopen($host, // the host of the server
        $port, // the port to use
        $errno, // error number if any
        $errstr, // error message if any
        $tval); // give up after ? secs

CMcjp4egPrzTKnO.png




方法来自:Z-blog在阿里云虚拟主机上无法使用STMP发件问题解决 - MayTinms的Blog

扫描二维码推送至手机访问。

版权声明:本文由 声光视趣 - lavfun.com 发布,如需转载请注明出处。

本文链接:https://www.lavfun.com/technical-forum/76.html

分享给朋友:

发表评论

访客

看不清,换一张

◎欢迎参与讨论,请在这里发表您的看法和观点。