title: php mail function goes straight to junk folder
body: <p>I have set up a contact form, with basic fields. The form is sent to the site owner and a message sent to the customer submitting the form. The function works but allways send the message to the junk folder. Is there something wrong with my headers or is it just hotmails junk settings.</p>
  
  <pre><code>$headers = "MIME-Version: 1.0rn"; 
  $headers .= "Content-type: text/html; charset=iso-8859-1rn"; 
  $headers  .= "From: contact@mysite.com\r\n"; 
  mail($to, $subject, $message, $headers)or die("mail error");
  </code></pre>
  
  <p>The message's are HTML emails, just a nicer way of displaying the message. Also in my email account instead of displaying my from varable it says ,' CGI Mailer' -- confusing.</p>
  
  <p>UPDATE - no longer works at all</p>
  
  <pre><code>//mail customer
  $from = 'donotreply@mysite.co.uk';
  $subject = 'Your message has been recieved.';
  
  $headers = "MIME-Version: 1.0\r\n"; 
  $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; 
  $headers .= 'From: My Site &lt;'.$from.'&gt;' . "\r\n";
  
  $msg = '
  &lt;html&gt;
  &lt;head&gt;
  &lt;link href="http://linktocss/.../etc" rel="stylesheet" type="text/css" /&gt;
  &lt;/head&gt;
  &lt;body&gt;
  formatted message...
  &lt;/body&gt;
  &lt;/html&gt;
  ';
  mail($email, $subject, $msg, $headers)or die("mail error");
  </code></pre>