我使用最新版本的WAMP,当我尝试发送电子邮件时出现以下错误:
请帮忙。
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\main\createaccount.php on line 8
发送失败...
该消息:
$to = "xxx@hotmail.com";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
if (mail($to, $subject, $body)) {
echo("<p>Message successfully sent!</p>");
} else {
echo("<p>Message delivery failed...</p>");
}
你需要下载一个“邮件服务器”吗?请帮忙。