php.ini 邮件_解决windows系统下php.ini邮件配置正确不发送邮件的问题

复制代码代码如下:

[mail function]

; For Win32 only.

SMTP = smtp.163.com

smtp_port = 25

; For Win32 ……

用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 = [email protected]

; For Unix only. You may supply arguments as well (default: “sendmail -t -i”).

sendmail_path = “D:\xampp\sendmail\sendmail.exe -t”

就配置三项,smtp、smtp_port和sendmail_path

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

[email protected]

sendmail网上有下的,如果你是用xampp,那里面直接就带了。

同时在虚拟主机的conf里加上这样一句

复制代码代码如下:

php_admin_value sendmail_path ‘D:\xampp\sendmail\sendmail.exe -t [email protected]’

此邮件地址为用户的邮件地址,随便添。

原文:http://www.jb51.net/os/windows/73906.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值