My code looks like this
$to = "mymailid@gmail.com";
$subject = "sample subject";
$body = "<div> hi hi .. </div>";
$headers = "Reply-To: The Sender <mymailid@gmail.com>\r\n";
$headers .= "Return-Path: The Sender <mymailid@gmail.com>\r\n";
$headers .= "From: The Sender <mymailid@gmail.com>\r\n";
$headers .='X-Mailer: PHP/' . phpversion();
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
mail($to, $subject, $body,$headers)
I have sent the suitalbe header in my mail function. Everytime when i run this code, my mail will go to the spam folder in my gmail account.. How do i avoid my mail going to spam folder?