要使用mail();
在php.ini中
[mail function]
; Windows系统的设置,SMTP = SMTP服务器的主机名,如本机运行邮件服务器.
;====================
SMTP = localhost; 发件人
sendmail_from = me@localhost
;====================
; Unix/linux系统. 需设置 "sendmail -t -i".如
;====================
sendmail_path = "/bin/sendmail -t -i"
;====================