我们的联系表格上的收件人电子邮件地址错误,所以我今天进去并更改了 PHP 文件,现在我收到此错误:
Warning: mail() [function.mail]: SMTP server response: 554 <info@fdb.uk.com>: Recipient address rejected: Relay access denied in \\nas19ent\Domains\f\fdb.uk.com\user\htdocs\PHP\mail.php on line 10
Error!
这是我用于联系表格的代码:
<?php
$name = $_POST['name'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$message = $_POST['message'];
$formcontent="This message has been generated from the FDB Electrical Contact page \n Name: $name \n Phone: $phone \n Email: $email \n Message: $message";
$recipient = "info@fdb.uk.com";
$subject = "Enquiry From FDB Electrical Website";
$mailheader = "From: $email \r\n";
mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
header('Location: ../contact2.html');
?>
任何人都可以让我知道发生了什么,这是我写的第一个 php,它以前运行良好。