电子邮件无法通过GoDaddy在Linux共享主机上提供

时间:2017-08-16 21:09:38

标签: php linux email shared-hosting mail-server

我们使用以下PHP代码通过电子邮件发送官方报告。我们使用每季度发送报告,并且在我们上次使用它时工作正常。但最近我们将 GoDaddy 上的Linux服务器计划从豪华共享主机方案升级到终极共享主机方案,并且还从移动了域名GoDaddy Google 现在我不明白此代码是否已停止运行服务器无法正常运行电子邮件未向收件人提供
我刚刚与GoDaddy技术团队进行了交谈,他们给我发了以下电子邮件:

  

排查结果:
   Splunk显示帐号不佳。   扫描可能访问此帐户的所有本地计算机是否存在恶意软件,例如特洛伊木马,键盘记录程序,病毒等。使用强密码更新与您的帐户关联的所有登录,包括:FTP,数据库和应用程序等。更新和使用最新,最安全的版本维护所有托管应用程序及其附加组件(插件,主题,小部件,模块等)。查看所有托管内容以查找恶意和无法识别的文件,并根据需要清除/删除/替换内容。将Captcha或人工验证方法添加到您在托管中的任何网站上的所有提交样式表单或评论部分。这包括CMS应用程序的任何登录页面或具有使用某种类型的提交按钮输入内容的字段的任何内容。告知我们您采取了哪些措施来确保托管以及您计划采取的措施以防止将来出现问题   并且队列中有16,000封电子邮件

从这封电子邮件中,我相信这段代码工作正常,但在某些与电子邮件服务相关的地方出现了问题,因为电子邮件服务无法提供我无法弄清楚的电子邮件。我不认为应该有一些恶意软件阻止邮件传递,我认为GoDaddy是从Splunk生成的分析报告中说的。

你能帮我理解解决这个问题的所有方法吗?

<?php
function compose_screen($form = false, $formFlag = 0) {
echo '<p>This report form covers all <em>Ten Tips</em> and <em>Love Your Neighbor</em> events including any variations of such presentations.</p>';
switch ($formFlag) {
    case 1:
        echo '<p class="error">One or more form fields are empty!</p>';
        break;
}
echo '<form action="'.$_SERVER[PHP_SELF].'" method="post" id="lynReport">';
echo '<ul><li>';
echo '<label for="yourName">Your name</label>';
echo '<input type="text" id="yourName" name="yourName" required value="'.htmlentities($form['yourName'], ENT_QUOTES, 'UTF-8').'">';
echo '</li><li>';
echo '<label for="dateEvent">Date of event (or first day of event)</label>';
echo '<input type="text" id="dateEvent" name="dateEvent" required value="'.htmlentities($form['dateEvent'], ENT_QUOTES, 'UTF-8').'">';
echo '</li><li class="listInputs">';
echo '<label>Type of event (choose closest description)</label>';
input_radiocheck('radio','typeEvent',$form,'full LYN with field trip',true);
echo '<span>Full LYN with field trip</span>';
input_radiocheck('radio','typeEvent',$form,'full LYN no field trip');
echo '<span>Full LYN, no field trip</span>';
input_radiocheck('radio','typeEvent',$form,'abbreviated LYN');
echo '<span>Abbreviated LYN</span>';
input_radiocheck('radio','typeEvent',$form,'10 tips');
echo '<span>Ten Tips</span>';
input_radiocheck('radio','typeEvent',$form,'expanded 10 tips');
echo '<span>Expanded Ten Tips</span>';
echo '<input type="radio" value="other" name="typeEvent" id="typeOther">';
echo '<span>Other (describe)</span>';
echo '<label class="error" for="typeEvent"></label>';
echo '<input type="text" id="typeEventDescrip" name="typeEventDescrip" value="'.htmlentities($form['typeEventDescrip'], ENT_QUOTES, 'UTF-8').'">';
echo '</li><li>';
echo '<label for="eventTrainers">Event trainers</label>';
echo '<input type="text" id="eventTrainers" name="eventTrainers" required value="'.htmlentities($form['eventTrainers'], ENT_QUOTES, 'UTF-8').'">';
echo '</li><li>';
echo '<label for="location">Location (city, state, country)</label>';
echo '<input type="text" id="location" name="location" required value="'.htmlentities($form['location'], ENT_QUOTES, 'UTF-8').'">';
echo '</li><li>';
echo '<label for="hostPartner">Hosting partner (church, pastor, local organizer)</label>';
echo '<input type="text" id="hostPartner" name="hostPartner" required value="'.htmlentities($form['hostPartner'], ENT_QUOTES, 'UTF-8').'">';
echo '</li><li>';
echo '<label for="numberAttend">Number attending</label>';
echo '<input type="text" id="numberAttend" name="numberAttend" required value="'.htmlentities($form['numberAttend'], ENT_QUOTES, 'UTF-8').'">';
echo '</li><li>';
echo '<label for="resultFeedback">Results (from feedback forms – How many expressed interest in South Asia Wired, Breakthough cell, other)</label>';
echo '<textarea id="resultFeedback" name="resultFeedback" required>'.htmlentities($form['resultFeedback'], ENT_QUOTES, 'UTF-8').'</textarea>';
echo '</li><li>';
echo '<label for="commentParticipant">Comments from participants (include a few good comments and suggested improvements, with full name)</label>';
echo '<textarea id="commentParticipant" name="commentParticipant" required>'.htmlentities($form['commentParticipant'], ENT_QUOTES, 'UTF-8').'</textarea>';
echo '</li><li>';
echo '<label for="potentialTrainer">Did you identify any potential associate trainer? (must have good communication/teaching skills, active in personal evangelism to Hindus)</label>';
echo '<input type="text" id="potentialTrainer" name="potentialTrainer" required value="'.htmlentities($form['potentialTrainer'], ENT_QUOTES, 'UTF-8').'">';
echo '</li>';
echo '<li>';
echo '<label for="anythingElse">Anything else you would like to share</label>';
echo '<textarea id="anythingElse" name="anythingElse">'.htmlentities($form['anythingElse'], ENT_QUOTES, 'UTF-8').'</textarea>';
echo '</li></ul>';
echo '<div class="finishForm">';
echo '<input type="submit" name="submit" value="Submit" />';
echo '<input type="reset" />';
echo '<input type="hidden" name="emailSent" value="1">';
echo '</div>';
echo '</form>';
}
function email_sent() {
$formFlag = 0;
foreach ($_POST as $key => $value) {
    $form[$key] = trim($value);
}
$formErrors = array();
foreach ($form as $k => $v) {
    switch ($k) {
        case "yourName":
        case "dateEvent":
        case "eventTrainers":
        case "location":
        case "hostPartner":
        case "numberAttend":
        case "resultFeedback":
        case "commentParticipant":
        case "potentialTrainer":
            if (!strlen($v)) {
                $formErrors[] = $v;
            }
            break;
    }
}
switch ($_POST['typeEvent']) {
    case "full LYN with field trip":
    case "full LYN no field trip":
    case "abbreviated LYN":
    case "10 tips":
    case "expanded 10 tips":
    case "other":
        break;
    default:
        $formErrors[] = $_POST['typeEvent'];
}
if ($_POST['typeEvent'] == "other") {
    if (!strlen($_POST['typeEventDescrip'])) {
        $formErrors[] = $_POST['typeEventDescrip'];
    }
}
if (count($formErrors) > 0) {
    $formFlag = 1;
    compose_screen($form, $formFlag);
} else {
    email_success($form);
}
}
function email_success($form) {
$mailTo = 'email@example.com';
$mailSubject = 'Love Your Neighbor Report';
$mailContent = 'Love Your Neighbor Report' . "\r\n\r\n";
$mailContent .= 'Name: ' . $form['yourName'] . "\r\n";
$mailContent .= "Date of event: " . $form['dateEvent'] . "\r\n";
$mailContent .= 'Type of event: ' . $form['typeEvent'] . "\r\n";
if ($form['typeEvent'] == "other") {
    $mailContent .= 'Describe: ' . $form['typeEventDescrip'] . "\r\n";
}
$mailContent .= 'Event trainers: ' . $form['eventTrainers'] . "\r\n";
$mailContent .= 'Location: ' . $form['location'] . "\r\n";
$mailContent .= 'Hosting partner: ' . $form['hostPartner'] . "\r\n";
$mailContent .= 'Number attending: ' . $form['numberAttend'] . "\r\n";
$mailContent .= 'Results: ' . $form['resultFeedback'] . "\r\n";
$mailContent .= 'Comments from participants: ' . $form['commentParticipant'] . "\r\n";
$mailContent .= 'Potential associate trainer?: ' . $form['potentialTrainer'] . "\r\n";
$mailContent .= 'Anything else to share: ' . $form['anythingElse'];
$mailCheck = mail($mailTo, $mailSubject, $mailContent);
echo '<p class="successParagraph">Your Report has been sent to Nayajeevan Ministries. Thank you for taking the time to talk to us.</p>';
unset($form);
echo '<p class="successParagraph"><a href="http://www.nayajeevan.org/resources/">Nayajeevan Web Site</a></p>';
echo '<p class="successParagraph"><form action="'.$_SERVER[PHP_SELF].'" method="post">';
echo '<input type="submit" name="submit" value="Submit Another Report" />';
echo '<input type="hidden" name="redoReport" value="1">';
echo '</form></p>';
}
include_once "../includes/input_radiocheck.inc";
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Love Your Neighbor Report</title>
<link href="../css/prayerReport.css" rel="stylesheet" type="text/css">
<link href="../css/jquery-ui-min.css" rel="stylesheet" type="text/css">
<link href="../css/jquery-ui-structure-min.css" rel="stylesheet" type="text/css">
<link href="../css/jquery-ui-theme-min.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="nayajeevanHdr">
<div>
    <div class="nayajeevanBanner">
        <img src="http://www.example.com/templates/ja_travel/images/logo.png" alt="Naya Jeevan">
</div>
</div>
</div>
<div id="mainWrapper">
<h1>Love Your Neighbor Report Form</h1>
<?php
if ($_POST['redoReport']) {
    compose_screen();
} elseif ($_POST['emailSent']) {
    email_sent();
} else {
    compose_screen();
}
?>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="../javascript/plugins/jquery-validate-min.js" type="text/javascript"></script>
<script src="../javascript/plugins/jquery-ui-min.js" type="text/javascript"></script>
<script>
// code for jQuery Validate plugin
$( "#lynReport" ).validate({
    rules: {
        typeEventDescrip: {
            required: "#typeOther:checked"
        }
    },
    messages: {
        typeEvent: "You must select one"
    }
});
// code for jQuery UI Datepicker plugin
$( "#dateEvent" ).datepicker({
    dateFormat: "M/dd/yy"
});
</script>
</body>
</html>
<?php
?>

0 个答案:

没有答案