php mail function not getting the emails
<p>ok, so I put together a very basic mail function and while testing this, I used a couple of email accounts, one my google account and the other my work account. I get all emails at the google account, but not to those pointing at my work. I'm thinking that could be because they have been caught up with the anti-spam software. Any ideas on how can I develop the mail function to avoid being caught on with spam software? </p>

<p>Here is a copy of my mail function</p>

<pre><code>$to      = 'account@gmail.com';
$subject = 'The subject';
$message = 'Hello,'."\n";
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";
$headers  = 'From: me@mycompnay.com' . "\r\n" .
'CC: anotherone@mycompany.com' . "\r\n";

$mail_sent = mail($to, $subject, $message, $headers);
if($mail_sent) {
    header("location:newlocation.php");
}
}
</code></pre>
