1、配置前准备插件
configure-smtp.3.1 发送邮箱配置插件 传送门:https://wordpress.org/plugins/configure-smtp/
replymail 评论回复邮箱提醒插件 传送门: https://wordpress.org/plugins/replymail/
2、安装配置Configure SMTP 插件
注意这里的SMTP password要填QQ邮箱授权码
QQ邮箱-设置-账户-生成授权码
点Save Chages保存配置
点Send test e-mail 测试邮件是否发送成功。如果失败请执行步骤3。
3、测试服务器是否支持mail()函数。
主目录创建mail.php文件代码如下。然后输入:你的域名/mail.php 提示message was sent! 且收到测试邮件说明支持。
<?php $txt = "hello"; // 以下的邮箱地址改成你的 $mail = '1169830941@qq.com'; // 发送邮件 mail($mail, "My subject", $txt); echo 'message was sent!'; ?>
4、iis下php mail函数的sendmail配置方法(官方推荐)
首先你需要先到从http://glob.com.au/sendmail/下载sendmail.zip文件,点此可以直接下载噢,然后把它解压到如C:\php\sendmail\目录下。
打开:php.ini文件 搜索 [mail function] 定位到下面代码
[mail function] ; For Win32 only. SMTP = localhost smtp_port = 25 ; For Win32 only. ;sendmail_from = me@example.com ; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). ; sendmail_path = "" ; Force the addition of the specified parameters to be passed as extra parameters ; to the sendmail binary. These parameters will always replace the value of ; the 5th parameter to mail(), even in safe mode. ;mail.force_extra_parameters =
把SMTP = localhost和smtp_port = 25前面加上”;”然后把sendmai_path=””前面的”;”删掉,改为sendmai_path=”c:\php\sendmail\sendmail.exe -t”
接着修改sendmail目录下的sendmail.ini文件,主要填的内容有以下几项
mtp_server=smtp服务器地址(如 smtp.qq.com)
auth_username=邮箱登录名(如 470038532@qq.com)
auth_password=邮箱密码(如 你的qq邮箱密码;一定要填授权码:QQ邮箱-设置-POP3/IMAP/SMTP/Exchange/CardDAV/CalDAV服务-生成授权码)
force_sender=发件人地址全写(如 470038532@qq.com)
smtp_ssl=auto
保存重启IIS或Apache。
常见问题FAQ
- 免费下载或者VIP会员专享资源能否直接商用?
- 本站所有资源版权均属于原作者所有,这里所提供资源均只能用于参考学习用,请勿直接商用。若由于商用引起版权纠纷,一切责任均由使用者承担。更多说明请参考 VIP介绍。
- 提示下载完但解压或打开不了?
- 找不到素材资源介绍文章里的示例图片?
- 好应资源网
另外下载的插件啊 🙂
插件那里搜或者百度搜都行 感觉WordPress的插件商城好慢 外国服务器原因?
加了传送门了 :redface:
弄好了吗? 😛