• 注册
    • 回帖总排行
    • 采纳总排行
    • 财富排行榜
    • 等级排行榜
  • learner
    We are the best gift for each other
    3002511金币
    关注
  • admintest
    We are the best gift for each other
    25金币
    关注
  • 讓歷史重演
    We are the best gift for each other
    2金币
    关注
  • 冰冷
    We are the best gift for each other
    2金币
    关注
  • 扬子江
    We are the best gift for each other
    2金币
    关注
  • 空白格‭
    We are the best gift for each other
    2金币
    关注
  • 相似的清风
    We are the best gift for each other
    2金币
    关注
  • 神经蛙
    We are the best gift for each other
    2金币
    关注
  • 高谈
    We are the best gift for each other
    2金币
    关注
  • 低调
    We are the best gift for each other
    2金币
    关注
  • learner
    We are the best gift for each other
    老铁/ 443 经验
    关注
  • admintest
    We are the best gift for each other
    小兵/ 7 经验
    关注
  • 讓歷史重演
    We are the best gift for each other
    小兵/ 0 经验
    关注
  • 冰冷
    We are the best gift for each other
    小兵/ 0 经验
    关注
  • 扬子江
    We are the best gift for each other
    小兵/ 0 经验
    关注
  • 空白格‭
    We are the best gift for each other
    小兵/ 0 经验
    关注
  • 相似的清风
    We are the best gift for each other
    小兵/ 0 经验
    关注
  • 神经蛙
    We are the best gift for each other
    小兵/ 0 经验
    关注
  • 高谈
    We are the best gift for each other
    小兵/ 0 经验
    关注
  • 低调
    We are the best gift for each other
    小兵/ 0 经验
    关注
  • 关注: 内容:

    解决wordpress无法发送邮件的问题的完美方案

  • 查看作者
  • 打赏作者
  • 拉黑名单
    •  解决wordpress无法发送邮件的问题的完美方案

      我的WordPress主机是万网的,配置WP-Mail-SMTP时一直无法发送邮件,导致设置失败。经过多次询问度娘才找到了解决wordpress无法发送邮件的方法,在这里把这个wordpress技巧分享给大家。

      万网的主机好像不支持mail函数,都需要通过 SMTP 来发送邮件,而且要开启 fsockopen 。但是 WordPress的SMTP发送方式为 steam_connect_client 而非fsockopen,下面来讲讲解决方法:

      1.用FTP打开 /wp-include/class-smtp.php ,最好是下载下来,搜索一下,查找到如下的代码:

      1. $this->smtp_conn = @stream_socket_client(

      2. $host . “:” . $port,

      3. $errno,

      4. $errstr,

      5. $timeout,

      6. STREAM_CLIENT_CONNECT,

      7. $socket_context

      8. );

      2.注释掉上面的代码:

      /**

      需要注释的代码

      */

      3.添加如下代码:

      1. $this->smtp_conn = fsockopen($host$port$errno$errstr);

      然后使用 WP SMTP 或 WP MAIL SMTP 这类 SMTP 发送邮件的wordpress插件,配置好就可以了。

      注意:由于这个方法是直接修改了 WordPress 的核心代码,一旦你升级了WordPress版本,就需要重新进行修改!

      你需要登录,才能进行发帖操作
    • 单栏布局 帖子间隔 侧栏位置: