如果自己使用的是虚拟主机,也不能发邮件怎么办呢?不要急,无论你使用的Windws主机,还是Linux主机,都可以通过安装邮件插件来实现发邮件。
比较常见的WordPress邮件插件有Configure SMTP、WP-Mail-SMTP等,建议使用WP-Mail-SMTP插件,比Configure SMTP多出一个发邮件的方式,那就是PHP mail()。
WP-Mail-SMTP怎么配置呢?请按照下边的WP-Mail-SMTP中文汉化图设置,如果使用的是网易126,163邮箱,直接修改邮箱就行了,SMTP host一栏修改为smtp.126.com或smtp.163.com。

解决WordPress无法发送邮件的方法
***重要说明*** :
1,如果你用的是网易邮箱,在开启邮箱的SMTP功能的时候,记得设置好“授权密码”,在这里插件的密码处要填写这个“授权密码”,否则还是发不了邮件的。
2,如果你的Wordpress是4.3 版本及以下,那么请修改模板函数才能发送邮件:
修改 /wp-includes/class-smtp.php
|
1
2
3
4
5
6
7
8
9
|
$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);






![Mysql innodb 系统表损坏带来的问题[Warning] InnoDB: Cannot open table XXX/wp_downloads from the internal data dictionary of InnoDB though the .frm file for the table exists. 终极解决办法](https://nrcs.xyz/wp-content/themes/begin/prune.php?src=https://nrcs.xyz/wp-content/uploads/2023/09/e4165-2023-09-28_102533.png&w=280&h=210&a=&zc=1)




评论