在php.ini中配置相应的sendmail路径。
[mail function]
; For Win32 only.
SMTP = smtp.163.com
smtp_port = 25
; For Win32 only.
sendmail_from = aa@163.com
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
sendmail_path ="D:/SendMail/sendmail.exe -t -i"
这样配置后就可以直接使用PHP自带的mail()函数来发送邮件了。
sendmail For win32下载地址:http://www.glob.com.au/sendmail/
源码下载:http://www.sendmail.org/
PHP+SendMail配置使用mail函数
最新推荐文章于 2023-09-28 04:32:10 发布