phpmailer~~或者配置一下php.ini
=============================
[mail function]
; For Win32 only.
; 配置smtp邮件服务器地址
SMTP =
; 配置端口
smtp_port = 25; For Win32 only.
; 配置发送邮件的信箱地址
;sendmail_from = ; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =
=============================
[mail function]
; For Win32 only.
; 配置smtp邮件服务器地址
SMTP =
; 配置端口
smtp_port = 25; For Win32 only.
; 配置发送邮件的信箱地址
;sendmail_from = ; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =
SMTP = localhost
smtp_port = 25; For Win32 only.
sendmail_from = [email protected]这样配置还是出现了错误
SMTP = localhost
smtp_port = 25; For Win32 only.
sendmail_from = [email protected]这样配置还是出现了错误
=========================================
SMTP = localhost //你是否安装了本地邮件服务器?没的话用不了.
sendmail_from = [email protected]
//如果你使用的是126的邮箱,则SMTP必须是126的服务器地址,而非localhost
但使用126发送邮件,需要登录(用户名,密码),才能收发邮件,mail()函数明显是不适用的。
你可以下载个phpmailer用。