I am trying to send email in hotmail inbox, every thing works fine but email goes in the junk folder of hotmail. I want to send the email in the inbox. In addition with, it works fine in case of gmail, msn and yahoo. here is my code:
<?php
if(isset($_POST['done']) )
{
$name = $_POST['xclient'];
$phoneno = $_POST['xphoneno'];
$clemail = $_POST['xclemail'];
$jouneytype = $_POST['xjouneytype'];
$pickup = $_POST['xpickup'];
$dropof = $_POST['xdropof'];
$jobdate = date('d-m-Y', strtotime($_POST['xjobdate']));
$jobtime = $_POST['xjobtime'];
$enddate = date('Y-m-d', strtotime($_POST['xenddate']));
$endtime = $_POST['xendtime'];
$to = $_POST['xdrvmail'];
$Cc = "myaddress@example.com";
// Multiple recipients
// Subject
$subject = ' ORDER DETAILS - ECL-WORLDWIDE';
// Message
$message = "
<html>
<head>
<title>Order Details</title>
</head>
<body>
<table>
<tr>
<td><b>Client Name</b></b></td><td>$name</td>
</tr>
<tr>
<td><b>Contact No</b></td><td>$phoneno</td>
</tr>
<td><b>Pickup Location</b></td><td>$pickup </td>
</tr>
<tr>
<td><b>Drop of Location</b></td><td>$dropof</td>
</tr>
<tr>
<td><b>Job Date</b></td><td>$jobdate</td>
</tr>
<tr>
<td><b>Job Time</b></td><td>$jobtime</td>
</tr>
<tr>
<td><b>Completion Date</b></td><td>$jobdate</td>
</tr>
<tr>
<td><b>Completion Time</b></td><td>$jobtime</td>
</tr>
</table>
</body>
</html>
";
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1" . "\r\n";
$headers .= "Cc: $Cc" . "\r\n";
$headers .= "From: ECL-Worldwide <myaddress@example.com>" . "\r\n" .
"Reply-To: myaddress@example.com" . "\r\n" .
"X-Mailer: PHP/" . phpversion();
mail($to, $subject, $message, $headers);
}
?>