我有一個自定義的html聯繫表格添加到我的一個與php表單(send-mail.php)集成的網站。郵件會通過POST方法發送到指定地址,您可以在下面粘貼的代碼中看到。php聯繫表格 - 發送給垃圾郵件的電子郵件
已收到的電子郵件已發送到收件人收件箱中的垃圾郵件文件夾,因此一段時間未被發現。收件人電子郵件客戶端是AOL。
是否有任何修改,我可以對我的代碼,以確保所有電子郵件到達收件箱?
我對HTML/PHP代碼形式都低於...
感謝
<form action="send-mail.php" method="POST">
<div class="form-group">
<label for="field_name" class="col-md-3 control-label">Name:</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="field_name" name="sender_name">
</div>
</div>
<div class="form-group">
<label for="field_email" class="col-md-3 control-label">Your e-mail:</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="field_email" name="sender_email">
</div>
</div>
<div class="form-group">
<label for="field_phone" class="col-md-3 control-label">Subject:</label>
<div class="col-sm-8">
<input type="text" class="form-control" id="field_phone" name="sender_phone">
</div>
</div>
<div class="form-group">
<label for="field_message" class="col-md-3 control-label">Message:</label>
<div class="col-sm-8">
<textarea id="field_message" class="form-control" rows="14" name="sender_message"></textarea>
</div>
</div>
<div class="form-group">
<div class="col-sm-10 col-sm-offset-3">
<input type="submit" class="btn btn-info" name="send_message" value="Send">
</div>
</div>
</form>
PHP形式...
<?php
$mail_to = '[email protected]';
$name = $_POST['sender_name'];
$mail_from = $_POST['sender_email'];
$phone = $_POST['sender_phone'];
$message = $_POST['sender_message'];
$subject = 'Mediation East Sussex - Message from ' . $name;
$body_message = 'From: ' . $name . "\r\n";
$body_message .= 'E-mail: ' . $mail_from . "\r\n";
$body_message .= 'Phone: ' . $phone . "\r\n";
$body_message .= 'Message: ' . $message;
$headers = 'From: ' . $mail_from . "\r\n";
$headers .= 'Reply-To: ' . $mail_from . "\r\n";
$mail_sent = mail($mail_to, $subject, $body_message, $headers);
if ($mail_sent == true){ ?> <script language="javascript" type="text/javascript">
alert('Thank you for the message. We will contact you shortly.');
window.location = 'contact_us.html';
</script>
<?php } else { ?>
<script language="javascript" type="text/javascript">
alert('Message not sent. Please, notify the site administrator [email protected]');
window.location = 'contact-form.html';
</script>
<?php
}
?>
15/2/16
謝謝對於建議傢伙,這裏是電子郵件的源代碼...對我來說意味着什麼,所以不知道它是否對si tuation?
x-store-info:fHNTDlzCF8Nxw6HwcfGQy+S7Ax/lqLSmNphQ3OF+T9E=
Authentication-Results: hotmail.com; spf=pass (sender IP is 188.121.43.201; identity alignment result is fail and alignment mode is relaxed) [email protected]; dkim=none (identity alignment result is pass and alignment mode is relaxed) header.d=gmail.com; x-hmca=none [email protected]
X-SID-PRA: [email protected]
X-AUTH-Result: NONE
X-SID-Result: NONE
X-Message-Status: n:n
X-Message-Delivery: Vj0xLjE7dXM9MDtsPTE7YT0wO0Q9MjtHRD0yO1NDTD00
X-Message-Info: 11chDOWqoTnMEo64LnD9BVKUHaeNkNd7wqUn23A//RySeublZ9ECBuN7qsUqH2ObwCexkObtS6T8EqV/zkipCDY1/OTveK4H1z4BpvwX2tuCS8rNmpjZMDxBREUjMU0UJIRnInCreID+tLPTeKK44fWrRgZWc9ufctrUNTnV8Xar+gGDJqE8uFIqpCSbx7mU2pnTxuTdWS9VCs1CFnCtie0kPaKc82I7+p4Lua/bHQUfxSunKCTOZA==
Received: from n1nlsmtp01.shr.prod.ams1.secureserver.net ([188.121.43.201]) by SNT004-MC4F6.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23143);
Mon, 15 Feb 2016 14:04:08 -0800
Received: from N1NWVPWEB009.ams1.gdhosting.gdg ([188.121.43.18])
by : HOSTING RELAY : with SMTP
id VRFWanlLzCZ2tVRFWalT7k; Mon, 15 Feb 2016 15:04:06 -0700
Date: Mon, 15 Feb 2016 22:04:06 +0000
Subject: Mediation East Sussex - Message from TEST
To: [email protected]
X-PHP-Originating-Script: 0:send-mail.php
From: [email protected]
Reply-To: [email protected]
X-CMAE-Envelope: MS4wfEfgYgSB0p6T/jtVzFhR4YhqJR1+NJ3wqDBvo5gi11ERgY7Zu9YfE8WzIt3djg1qZ+dNeRfMjInsUYTaA5U1Zza6jpAxWbhF4EV+vG0rR8+vGhQxE9QP
5L3ZY5wWG3pDpu/+YJAlkniqNIXjDeZRscz95Ks5cNapMVwUxl0MsyZJED+TxWS3Ppth2Me6m5WlMRi93Eel7bupYULKKrem640=
Return-Path: [email protected]
Message-ID: <[email protected]>
X-OriginalArrivalTime: 15 Feb 2016 22:04:08.0195 (UTC) FILETIME=[CAE77D30:01D1683C]
From: TEST
E-mail: [email protected]
Phone: test
Message: test
_guessing_這個問題可能是沒有意義的。您必須瞭解垃圾郵件過濾器的工作原理。通常他們將判斷的原因添加到電子郵件中包含的標題中。所以抓住這樣的電子郵件,並看看標題。通常情況下,您會看到一組規則和得分點,正好表明郵件被視爲垃圾郵件。注意:您需要電子郵件,而不是電子郵件正文的副本。 – arkascha
好,那麼在哪裏我可以找到這些規則和要點?我需要從收件人電子郵件客戶端查看它,然後他們不能將電子郵件轉發給我? – Chris
要求他們發送原件作爲附件,通常保留所有標題。然後用普通的文本編輯器打開該電子郵件(或收到的完整電子郵件)。標題在消息內容之前,以空行分隔。它們包含從服務器到服務器的路由信息,一些控制標題,如編碼,主題,來自和來自現場以及希望還有一些垃圾郵件過濾器的標記。 – arkascha