I am trying to send mail after proceed order. I am using following code but its not working. its not sending any email after proceed.
$to = 'abc@gmail.com';
$subject = "Order Confirmation - Your Order with Mysite.com[order0001] has been successfully placed!";
$from = " admin@mysite.com";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers = "From: $from\nMIME-Version: 1.0\nContent-Type: text/html; charset=utf-8\n";
$message = '<html><head></head><body><h1>Hi !</h1><table>';
while($main = mysqli_fetch_array($selector)) {
$prid = $main['p_id'];
$qu = $main['quantity'];
$ototal = $main['order_total'];
$norder = $main['net_order_amount'];
$slecp = mysqli_query($db, "SELECT * FROM `product` WHERE `p_id` = '$prid'");
$selr = mysqli_fetch_array($slecp);
$prname = $selr['p_name'];
$primg = $selr['p_image'];
$image = "http://www.myindiamade.com/images/$primg";
$message .= "<tr>
<td><img src='".$image."'></td>
</tr>";
}
$message .='</table></body></html>';
mail($to,$subject,$message,$headers);