不知道你们有没有使用万网的主机,如果使用了,可能你们也遇到了和我一样的问题,没错,主题猫使用的就是万网的虚拟主机。
使用万网的主机,wordpress是不会发送邮件提醒的,但是方法总比困难多,今天就给大家解决这个问题。
修改 /wp-includes/class-smtp.php
202-208 行的位置,查找到下面的代码:
$socket_context = stream_context_create($options); $this->smtp_conn = @stream_socket_client( $host . ":" . $port, $errno, $errstr, $timeout, STREAM_CLIENT_CONNECT, $socket_context );
修改为:
$this->smtp_conn = @fsockopen($host,$port,$errno,$errstr,$timeout);
最新评论