我正在尝试将联系表单添加到将表单数据发布到电子邮件地址的网站上.它适用于任何其他电子邮件注册人,如Gmail和雅虎.但它不适用于具有相同域名的电子邮件(例如:info@domain.com或support@domain.com).
同样的形式与godaddy豪华托管工作正常但现在我已转移到Godaddy CPanel linux托管豪华计划,它不起作用.
请仔细阅读我正在使用的以下代码,并告诉我需要更改的内容.非常感谢您的建议.提前致谢.
码:
<?php
if(isset($_POST['email'])) {
$email_to = "info@domain.com";
$email_subject = "Enquiry website";
function died($error) {
// your error code can go here
echo "We are very sorry, but there were error(s) found with the form you submitted. ";
echo "These errors appear below.<br /><br />";
echo $error."<br /><br />";
echo "Please go back and fix these errors.<br /><br />";
die();
}
// validation expected data exists
if(!isset($_POST['author']) ||
!isset($_POST['email']) ||
!isset($_POST['subject']) ||
!isset($_POST['text'])) {
died('We are …Run Code Online (Sandbox Code Playgroud)