Z-blog在阿里云虚拟主机上无法使用STMP发邮件问题解决办法
首先,确保阿里云虚拟主机管理后台的“PHP函数fsockopen设置”是开启状态:
然后前往找到文件:/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
扫描二维码推送至手机访问。
版权声明:本文由 声光视趣 - lavfun.com 发布,如需转载请注明出处。