title: All mail sent from mail() goes to Spam yet correct headers etc
body: <p>I've been doing a lot of reading up on this yet still can't find a solution. I'm building a site that sends a voucher by email to it's users once they've submitted a form. The problem I'm having is that the mail sent by the script is being screened by spam filters as being spam, yet it isn't as it's user submitted. This is the script I'm using: </p>
  
  <pre><code>&lt;?php 
  
  error_reporting(0); 
  
  include("/home/users/web/b2243/moo.wheree/inc/event.inc"); 
  include("/home/users/web/b2243/moo.wheree/inc/ad.inc"); 
  
  $boundary = md5(time()) . "-2"; 
  $eol = "\r\n"; 
  $subject = "Tonights wheree voucher - $offer"; 
  
  $fromaddress = "no-reply@wheree.co.uk"; 
  $fromname = "wheree"; 
  
  $headers = ''; 
  $headers .= "Message-ID: &lt;".time()."-".$fromaddress."&gt;" . $eol; 
  $headers .= "Date: ".date('r'). $eol; 
  $headers .= "From: ".$fromname. "&lt;".$fromaddress."&gt;" . $eol; 
  
  $headers .= "Reply-To: ".$fromname. "&lt;".$fromaddress."&gt;" . $eol; 
  $headers .= "Return-Path: ".$fromname."&lt;".$fromaddress."&gt;" . $eol;
  
  $headers .= "X-Mailer: PHP v" .phpversion(). $eol; 
  $headers .= 'MIME-Version: 1.0' . $eol; 
  $headers .= "Content-Type: multipart/alternative; boundary=\"$boundary\"" . $eol . $eol; 
  
  $headers .= "This is a MIME-formatted message.". $eol . $eol; 
  
  $msg = ''; 
  
  //text 
  $msg .= "--" . $boundary . $eol; 
  $msg .= "Content-Type: text/plain; charset=gb2312" . $eol; 
  $msg .= "Content-Transfer-Encoding: 8bit" . $eol; 
  $msg .= "Content-Disposition: INLINE" . $eol; 
  $msg .= "Content-Description: INLINE Description;" . $eol; 
  $msg .= strip_tags(str_replace("&lt;br&gt;", "\n", $rBody)); 
  $msg .= $eol . $eol; 
  
  //html 
  $msg .= "--" . $boundary . $eol; 
  $msg .= "Content-Type: text/html; charset=utf-8;" . $eol; 
  $msg .= "Content-Transfer-Encoding: 8bit" . $eol; 
  $msg .= "Content-Disposition: INLINE" . $eol; 
  $msg .= "&lt;!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"&gt;" . $eol; 
  $msg .= 'Message Contents' . $eol; 
  $msg .= $eol . $eol; 
  
  $mail_sent = mail($email, $subject, $msg, $headers, "-f no-reply@wheree.co.uk"); 
  
  // Check if Mail is sent 
  if ($mail_sent) 
  include("/home/users/web/b2243/moo.wheree/inc/sent.php"); 
  else { 
  echo "&lt;br&gt; Message not sent, &lt;a href="/"&gt;have another go&lt;/a&gt;.&lt;br&gt;"; 
  } 
  
  ?&gt;
  </code></pre>
  
  <p>The site is hosted on a shared hosting plan, could this be the problem? I've also heard about reverse DNS? Thanks in advance for your help.</p>