Winserver2012_IIS8.5实现WordPress评论邮件提醒

2017-04-08 0 1,638 百度已收录

1、配置前准备插件

configure-smtp.3.1    发送邮箱配置插件    传送门:https://wordpress.org/plugins/configure-smtp/

replymail  评论回复邮箱提醒插件         传送门:  https://wordpress.org/plugins/replymail/

2、安装配置Configure SMTP 插件

Winserver2012_IIS8.5实现WordPress评论邮件提醒 Winserver2012_IIS8.5实现WordPress评论邮件提醒

注意这里的SMTP password要填QQ邮箱授权码

QQ邮箱-设置-账户-生成授权码

Winserver2012_IIS8.5实现WordPress评论邮件提醒

点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。

收藏 (0) 打赏

感谢您的支持,我会继续努力的!

打开微信/支付宝扫一扫,即可进行扫码打赏哦,分享从这里开始,精彩与您同在
点赞 (0)

好应网 SEO教程 Winserver2012_IIS8.5实现WordPress评论邮件提醒 https://www.yejianda.cn/seo/739.html

常见问题

相关文章

评论
4 条评论
2017 年 4 月 8 日 上午 10:02 回复

另外下载的插件啊 🙂

官方客服团队

为您解决烦忧 - 24小时在线 专业服务