不清楚你们有没有应用万网域名的服务器,假如采用了,很有可能你们也碰到了与我一样的问题,没有错,主题风格猫应用的便是万网域名的云服务器。
应用万网域名的服务器,wordpress是不容易邮件发送提示的,可是方式总比难题多,今日就给我们彻底解决这个问题。
改动 /wp-includes/class-smtp.php
202-208 行的部位,搜索到下边的编码:
- $socket_context = stream_context_create($options);
- $this->[email protected]/* */_socket_client(
- $host . “:” . $port,
- $errno,
- $errstr,
- $timeout,
- STREAM_CLIENT_CONNECT,
- $socket_context
- );
改动为:
- $this->smtp_conn = @fsockopen($host,$port,$errno,$errstr,$timeout);