-4
我試圖學習如何使用PHP發送郵件。我有以下重定向(所以我的代碼正在閱讀)但郵件不被髮送,任何人都可以看到任何明顯的語法錯誤?我不明白什麼是錯的?使用PHP的簡單郵件表格
$aaa = $_POST['recipient-name'];
$bbb = $_POST['address-line'];
$ccc = $_POST['town-name'];
$ddd = $_POST['county-name'];
$eee = $_POST['postcode-name'];
$fff = $_POST['mesage-blob'];
// The message
$message = $aaa . ' and ' . $bbb . ' and ' . $ccc . ' and ' . $ddd . ' and ' . $eee . ' and ' . $fff;
// In case any of our lines are larger than 70 characters, we should use wordwrap()
$message = wordwrap($message, 70, "\r\n");
// Send
mail('[email protected]', 'subjeeect', $message);
header('Location: /thankyou.php');
沒有語法錯誤。你的mail.log說什麼? – Richard
沒有語法錯誤。檢查垃圾郵件文件夾。您的電子郵件很可能被髮送到垃圾郵件文件夾,因爲您發送的服務器沒有任何主要電子郵件提供商的代表或歷史記錄。 –