【发布时间】:2011-07-28 20:35:16
【问题描述】:
我有一个使用 jQuery 和 PHP 编写的联系表。下面是 PHP 位,当我将 $yourremail 变量更改为我的 gmail 帐户时,它工作得非常好,但我的办公室 Outlook 帐户中从未收到电子邮件。 我有什么遗漏吗?
<?php
// Email Vars
$youremail = "my_email@on_outlook2007.com";
$headers = "From: $name <$email>\n";
$subject = "Subject Line Here";
$ip = $_SERVER['REMOTE_ADDR'];
$message_clean = html_entity_decode(stripslashes($message));
// Format Email
$email_format_cc = $message_clean . "\n\n" . "___________________________________________________________________________" . "\n\n" .
"Name: " . $name . "\n" .
"Company: " . $company . "\n" .
"IP Address: " . $ip . "\n" .
"Sent: " . $timestamp;
$email_format = $email_format_cc . "\n" .
"Page: " . $from_url;
mail($youremail, $subject, $email_format, $headers);
?>
【问题讨论】:
-
不依赖于接收方地址。你检查垃圾邮件文件夹了吗?
-
是的,我检查了垃圾邮件文件夹。没有运气。
标签: php email gmail outlook-2007 contact-form