立即注册 找回密码

QQ登录

只需一步,快速开始

查看: 3192|回复: 0

[通用使用教程] 如何在Windows系统配置sendmail使用PHP的mail函数

[复制链接]
发表于 2016-7-7 16:37:34 | 显示全部楼层 |阅读模式
道勤网-数据www.daoqin.net

亲注册登录道勤网-可以查看更多帖子内容哦!(包涵精彩图片、文字详情等)请您及时注册登录-www.daoqin.net

您需要 登录 才可以下载或查看,没有账号?立即注册

x
注意:如果不是自己的服务器的话用其他方法发吧,方法多得是!

mail函数在win里可以通过配置php.ini来正常使用
打开php.ini
[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,smtp_port,sendmail_from。分别是pop3服务器地址,端口号这两个一般默认,sendmail_from设置的是发件人邮箱
注意的是这里需要的pop3服务器是不需要身份验证的那种而且不能使用安全方式连接的。国内有些没有提供不验证服务的…在服务器上装上smtp组件就可以了,安装方法很多网上都有
如果不打算让本机成为smtp服务器,可以使用linux常用的sendmail,这样可以通过验证使用国内的一些服务器的pop3服务器,建议是qq或者foxmail个人感觉腾讯的速度和稳定都不错。
经测试目前163、新浪的SMTP无法使用,qq和foxmail可以用,其他没测试…

win下怎么配置呢
[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 = ”d:/soft/sendmail/sendmail.exe -t -i”
; 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 =

按上面的方式把前面说的三个选项前面都加上分号,把sendmail_path前面的分号去掉下载下面的文件:
sendmail压缩包
1-13102311152D32.rar (139.47 KB, 下载次数: 0)
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

道勤网- 推荐内容!上一条 /2 下一条

!jz_fbzt! !jz_sgzt! !jz_xgzt! 快速回复 !jz_fhlb! !jz_lxwm! !jz_gfqqq!

关于我们|手机版|小黑屋|地图|【道勤网】-www.daoqin.net 软件视频自学教程|免费教程|自学电脑|3D教程|平面教程|影视动画教程|办公教程|机械设计教程|网站设计教程【道勤网】 ( 皖ICP备15000319号-1 )

GMT+8, 2024-4-25 08:23

Powered by DaoQin! X3.4 © 2016-2063 Dao Qin & 道勤科技

快速回复 返回顶部 返回列表