-
مشکل با mail در php
سلام. با این کد که برای ارسال ایمیل استفاده میکنم . هیچ ایمیلی برای hotmail و msn نمیاد ولی تو gmail و yahoo مشکلی نیست.
کد:
<?
$email_address = "info@kolbeh.se";
$email_name = "kolbeh";
$next_page = "thanks_p.html";
$name= $_POST["name"];
$lGuest= $_POST["lGuest"];
$dtDate= $_POST["dtDate"];
$dtTime= $_POST["dtTime"];
$strPhone= $_POST["strPhone"];
$email= $_POST["email"];
$body = "";
$body .= "NAME: " . $name . "\n";
$body .= "lGuest: " . $lGuest . "\n";
$body .= "dtDate: " . $dtDate. "\n";
$body .= "dtTime: " . $dtTime . "\n";
$body .= "strPhone: " . $strPhone . "\n";
$body .= "email: " . $email. "\n";
$headers = "";
$headers .= "From: " . $email_name . " <" . $email_address . ">\n";
$headers .= "X-Sender: <" . $email_address . ">\n";
$headers .= "X-Mailer: PHP\n";
$headers .= "X-Priority: 1\n";
$headers .= "Return-Path: <" . $email_address . ">\n";
$headers .= "Content-Type: text/html; charset=UTF-8\n";
@mail($email_address, "Contact Center", "<pre>" . $body . "</pre>", $headers);
header("Location: " . $next_page);
$headerss = "";
$headerss .= "From: " . $email_name . " <" . $email . ">\n";
$headerss .= "X-Sender: <" . $email . ">\n";
$headerss .= "X-Mailer: PHP\n";
$headerss .= "X-Priority: 1\n";
$headerss .= "Return-Path: <" . $email . ">\n";
$headerss .= "Content-Type: text/html; charset=UTF-8\n";
$bodyy = "";
$bodyy .= "<div align=\"right\" style=\"font-family:Tahoma; font-size:12px\">";
$bodyy .= "!با سلام\n
جهت قدردانی از حسن انتخاب شما رستوران کلبه شما را به نوشیدنی میهمان میکند\n
با سپاس\n
رستوران کلبه\n";
$bodyy .= "</div>";
$bodyy .= "Info@kolbeh.se\n
http://www.kolbeh.se";
//This sends a confirmation to your visitor
@mail($email, "Kolbehstugan", "<pre>" . $bodyy . "</pre>", $headerss);
//Confirmation is sent back to the Flash form that the process is complete
$sendresult = "Done!";
$send_answer = " MERSI ";
$send_answer .= rawurlencode($sendresult);
echo "$send_answer";
?>
-
احتمال داره که msn یا hotmail اون رو spam تشخیص میده و اجازه ورود تو میل باکست رو نمیده ...
-
سلام. ممنونم. البته یاهو هم تو قسمت bulk میرازه ولی hotmail اصلا نه تو اینباکس نه تو اسپم یا بالک.