我有一个简单的脚本,在我的其他服务器上都能正常工作,但在我需要的那个服务器上却不能...
<?php
$name = $_POST['Name'];
$email = $_POST['Email'];
$phone = $_POST['Phone'];
$message = $_POST['Message'];
$formcontent="Name: $name \n Email: $email \n Phone No: $phone \n Services: $services \n Message: $message";
$recipient = "gaurav.m@momentsworld.com";
$subject = "Client Details";
$mailheader = "From: $email \r\n";
mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
echo "Thank You!" . " -" . "<a href='../contact.html' style='text-decoration:none;color:#ff0099;'>Return Home</a>";
?>
当我尝试通过表单提交联系人详细信息时,它会出现错误。
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 D:\Inetpub\vhosts\momentsworld.com\httpdocs\script\quick_query.php on line 17
尽管相同的脚本在其他服务器上运行良好...请帮忙。