I tried the code below but it is still sending to SPAM folder. Kindly help me to figure this out such that emails goes to INBOX only.
function sendEmail($content,$email,$phone){
$headers = "Reply-To: Danuel <".$email.">\r\n";
$headers .= "Return-Path:Danuel <".$email.">\r\n";
$headers .= "From:Danuel <".$email.">\r\n";
$headers .= "Organization:Danuel international\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/plain; charset=iso-8859-1\r\n";
$headers .= "X-Priority: 3\r\n";
$headers .= "X-Mailer: PHP". phpversion() ."\r\n";
$to ="xxxxxxxxx@gmail.com";
$subject ="Number ".$phone." Banned";
return mail($to, $subject, $content, $headers);
}
if(isset($_POST['send'])){
$content='Hey';
if(sendEmail($content,$_POST['email'],$_POST['phone'])==1){
echo"<small><font color=green>Sent</font></small>";
}else{
echo"<small><font color=red>Failed</font></small>";
}
}