可能重复:
hotmail.com 未收到邮件
我的网站上有这个简单的表格,当它发送到我的 Hotmail 帐户时,我没有收到电子邮件,甚至没有收到垃圾文件夹。
这是表单代码:
<form action="mail.php" method="POST">
<p><label title="Name">Name:</label><br />
<input type="text" name="name" autocomplete="on" required="required"></p>
<p><label title="Email">Email:</label><br />
<input type="text" name="email" autocomplete="on" required="required"></p>
<p><label title="About">My message is about...</label><br />
<select name="about">
<option value="general">General Query</option>
<option value="wedding">Wedding</option>
<option value="corporate">Corporate Event or Trade Show</option>
<option value="other">Other Event</option>
</select>
<p><label title="Message">Message:</label><br />
<textarea name="message" rows="6" cols="25" required="required"></textarea></p>
<input type="submit" value="Send">
</form>
和 mail.php 文件:
<?php
$name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
$about = $_POST['about'];
$formcontent="From: $name \n About: $about \n Message: $message";
$recipient = "MyEmailAddress@Live.co.uk";
$subject = "Contact Form";
$mailheader = "Reply-To: $email \r\n";
mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
echo "Thank You!";
?>
我最终确实看到了一个带有“谢谢!”的页面。显示但未收到电子邮件。