wordpress建设博客或电商网站之四:解决发送邮件和用户注册的BUG
来源:互联网 发布:战地2网络对战平台 编辑:程序博客网 时间:2024/05/01 09:29
wordpress建设博客或电商网站之四
解决发送邮件和用户注册的BUG
1 发送邮件
我的电商网站pepstack.com用QQ的SMTP服务发送邮件,因此需要使用一个插件:Configure SMTP。管理员登陆站点,进入管理员界面。插件->安装插件:Configure SMTP,设置如下:
Clicking this will override many of the settings defined below. You will need to input your GMail username and password below.
If "localhost" doesn't work for you, check with your host for the SMTP hostname.
This is generally 25.
Sets connection prefix for secure connections (prefix method must be supported by your PHP install and your SMTP host)
If checked, you must provide the SMTP username and password below
Sets word wrapping on the body of the message to a given number of characters.
Only check this if you are experiencing problems and would like more error reporting to occur. Uncheck this once you have finished debugging.
Sets the From e-mail address for all outgoing messages. Leave blank to use the WordPress default. This value will be used even if you don't enable SMTP. NOTE: This may not take effect depending on your mail server and settings, especially if using SMTPAuth (such as for GMail).
Sets the From name for all outgoing messages. Leave blank to use the WordPress default. This value will be used even if you don't enable SMTP.
其中STMP password使用的是QQ的SMTP授权码而不是我登陆QQ的口令。master@pepstack.com是我的QQ邮箱设置为域名邮箱。用户可以直接使用自己的QQ邮箱(打开POP3,SMTP等服务)。这样一个可以发送邮件的网站就好了。
2 激活注册邮件BUG
然而我在pepstack.com新注册的用户(用我另外的QQ号)时,却无法激活注册邮件。错误类似:
WordPress 密码重置提示 您的密码重设链接无效
http://blog.csdn.net/h1217/article/details/53422835
解决办法是修改2个文件:
/opt/wordpress/wp-login.php
/opt/wordpress/wp-includes/pluggable.php
1) /opt/wordpress/wp-login.php: 约332行
原代码:
修正后:
$message .= network_site_url("wp-login.php?action=rp&key=$key&login=" . rawurlencode($user_login), 'login');
2) /opt/wordpress/wp-includes/pluggable.php: 约1791行
原代码:
$message .= '<' . network_site_url("wp-login.php?action=rp&key=$key&login=" . rawurlencode($user->user_login), 'login') . ">\r\n\r\n";
$message .= wp_login_url() . "\r\n";
修正后:
$message .= network_site_url("wp-login.php?action=rp&key=$key&login=" . rawurlencode($user->user_login), 'login'); /* $message .= wp_login_url() . "\r\n"; */
然后重启服务:
$ sudo service apache2 reload#### $ sudo service apache2 stop
#### $ sudo service apache2 start
#### $ sudo service apache2 restart
- wordpress建设博客或电商网站之四:解决发送邮件和用户注册的BUG
- wordpress建设博客或电商网站之二:wordpress安装
- wordpress建设博客或电商网站之三:wordpress配置
- wordpress建设博客或电商网站之五:php快速入门
- wordpress建设博客或电商网站之一:安装与配置phpmyadmin
- 网站建设之邮件发送形式
- 【电商网站】发送短信、发送邮件
- 网上商城之用户注册发送邮件激活
- WordPress发送注册用户设置密码邮件提示:您的密码重设链接无效,请在下方请求新链接
- WordPress发送注册用户设置密码邮件提示:您的密码重设链接无效,请在下方请求新链接
- 自动邮件发送博客文章的WordPress插件
- 解决wordpress用户注册时,点击邮件中的重置密码链接提示“您的密码重设链接无效”
- 解决wordpress用户注册时,点击邮件中的重置密码链接提示“您的密码重设链接无效”
- 发送邮件的bug
- 购物网站20:用户/顾客action----用户列表---用户退出---用户管理---用户登录---用户注册---修改密码---发送邮件
- Domino为新注册的用户发送欢迎邮件
- 使用wordpress搭建独立域名的个人博客或网站
- wordpress留言发送收不到邮件或进入垃圾有的解决方式
- 数据库模式
- js中undefined,null,NaN的区别
- runOnUiThread()方法
- 分解的素数
- Android Studio 安装及配置
- wordpress建设博客或电商网站之四:解决发送邮件和用户注册的BUG
- <spark>新手helloworld
- 主机ip查找程序
- Android Studio Api25 File Explorer 不显示内容问题的解决
- Storj:A Peer-to-Peer Cloud Storage Network(点对点云存储网络)
- 关于Function.prototype.apply.call的一些补充
- 线程安全和可重入函数的区别和联系
- 运行时异常与受检查异常有何异同(runtime exception 和 checked exception)
- 蓝桥-分解质因数