I have a question about the PHP mail function. While I'm using it only sends emails which are detected as Spam, and changing or adding headers doesn't make any difference.
Here is my code:
$to = $email;
$subject = "The Subject";
$message = "This is a message<br/>
This is another line<br>
And another line..<br>";
$headers = "From: example@mydomain.com\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$headers .= "X-Priority: 3\r\n";
$headers .= "Reply-To: example@mydomain.com\r\n";
$headers .= "Return-Path: example@mydomain.com\r\n";
mail($to, $subject, $message, $headers);
Could someone please help me out?