最佳答案
当我尝试用 PHP 发送电子邮件时,总是出现这个错误:
Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\wamp\www\dressoholic\register.php on line 50
我的 php.ini 是这样的:
[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = localhost
; http://php.net/smtp-port
smtp_port = 25
; For Win32 only.
; http://php.net/sendmail-from
sendmail_from = you@yoursite.com
我用我的笔记本电脑作为服务器. . 我做错了什么? 谢谢。