Windows server支持WordPress自动发邮件

2018-03-13 12:54:52 3975

1、从官网http://www.landui.com/sendmail/下载sendmail.zip 
2、解压到C:下,例如C:\php\sendmail,最好短路径,长路径名有可能产生问题。
3、修改php.ini如下

sendmail_path = "C:\wamp\sendmail\sendmail.exe -t"

4、根据你自己的配置环境修改sendmail.ini
第一次最好启用 debug.log_file,error_logfile,以查看sendmail是否生效。

5、重启apache
用sendmail结合其它的smtp服务器,如smtp.163.com来实现发邮件。现在大部分邮箱都要求smtp验证,所以要在sendmail.ini中加入用户名和密码。
php.ini配置 (以用163邮箱为例)

[mail function] ; For Win32 only. SMTP = smtp.163.com 
smtp_port = 25 ; For Win32 only. sendmail_from = yourusername@163.com 
; For Unix only. You may supply arguments as well (default: “sendmail -t -i”). sendmail_path = “D:\xampp\sendmail\sendmail.exe -t”

6、sendmail.ini配置

[sendmail] ; you must change mail.mydomain.com to your smtp server 
smtp_server=smtp.163.com 
smtp_port=25 auth_username=yourusername 
auth_password=yourpassword 
force_sender=yourusername@163.com

7、你如果使用xampp原版的已经集成了sendmail,如果是汉化精简版的,需要手动把sendmail复制到xampp文件夹下面,再重新配置。


提交成功!非常感谢您的反馈,我们会继续努力做到更好!

这条文档是否有帮助解决问题?

非常抱歉未能帮助到您。为了给您提供更好的服务,我们很需要您进一步的反馈信息:

在文档使用中是否遇到以下问题: