使用内建的mail()函数先要配置好参数:在win32下,php.ini(不支持smtp验证):SMTP = localhostsmtp_port = 25在unix下,确定能调用到 sendmail。