title: Two almost identical php mail scripts. One goes to junk, and the other doesn't
body: <p>I have two almost identical mail scripts which sends a user a confirmation email after he has completed an order. The first one pasted below goes straight to outlook's junk e-mail folder while the second one goes straight to inbox as it is supposed to. I've been tearing my hair out because of this and I can't see anything that should send the first one to the junk folder.</p>
  
  <p>1: The script that goes straight to junk</p>
  
  <pre><code>$to  = $epost . ', ';
  $to .= 'mail@mail.mail';
  $subject = 'Ny bestilling fra url.com';
  $headers = "From: mail@mail.mail\n";
  $headers .= "Reply-To: mail@mail.mail\n";
  $headers .= "Content-type: text/plain; charset=iso-8859-1\n";
  $message = '&lt;h2&gt;Ordrebekreftelse url.com&lt;/h2&gt;
  &lt;p&gt;Ordre ID: '.$ordre_id.'&lt;/p&gt;
  &lt;p&gt;Takk for din bestilling. Oblatene vil normalt leveres innen 1-3 dager.&lt;/p&gt;
  &lt;p&gt;Nedenfor vil du se hva din bestilling inneholder:&lt;/p&gt;
  &lt;p&gt;Oblater: '.$antall_oblat.' stk.&lt;/p&gt;
  &lt;p&gt;F&amp;oslash;lgende rekvisita er valgt:&lt;/p&gt;
  &lt;p&gt;Futteral: '.$antall_futteral.' stk.&lt;br /&gt;
  Plastlommer: '.$antall_reflekslomme.' stk.&lt;br /&gt;
  Lanyards: '.$antall_lanyard.' stk.&lt;/p&gt;&lt;br /&gt;
  &lt;p&gt;Dersom du har sp&amp;oslash;rsm&amp;aring;l eller har bestilt feil, vennligst send oss en &lt;a href="mailto:mail@mail.mail"&gt;e-post&lt;/a&gt; med ordre IDen som emnefelt.';
  </code></pre>
  
  <p>2: The script that goes straight to inbox as supposed.</p>
  
  <pre><code>$to  = $epost . ', ';
  $to .= 'mail@mail.mail';
  $subject = 'Ny bestilling fra url.com';
  $headers = "From: mail@mail.mail\n";
  $headers .= "Reply-To: mail@mail.mail\n";
  $headers .= "Content-type: text/html; charset=iso-8859-1\n";
  $message = '&lt;h2&gt;Ordrebekreftelse url.com&lt;/h2&gt;
  &lt;p&gt;Ordre ID: '.$ordre_id.'&lt;/p&gt;
  &lt;p&gt;Takk for din bestilling. Kortene er sendt til produksjon og vil leveres innen 1 - 3 dager etter at godkjente filer er mottatt.&lt;/p&gt;
  &lt;p&gt;Nedenfor vil du se hva din bestilling inneholder:&lt;/p&gt;
  &lt;p&gt;Korttype: &lt;strong&gt;'.$korttype.'&lt;/strong&gt; (1 = Uten magnetstripe, 2 = Magnetstripe, 3 = Mifare/ber&amp;oslash;ringsfritt med magnetstripe)&lt;/p&gt;
  &lt;p&gt;Med de bestilte kortene f&amp;oslash;lger det samme antall oblater med gyldighet for gjeldene periode.&lt;/p&gt;
  &lt;p&gt;F&amp;oslash;lgende rekvisita er valgt:&lt;/p&gt;
  &lt;p&gt;Futteral: '.$antall_futteral.' stk.&lt;br /&gt;
  Plastlommer: '.$antall_reflekslomme.' stk.&lt;br /&gt;
  Lanyards: '.$antall_lanyard.' stk.&lt;/p&gt;&lt;br /&gt;
  &lt;p&gt;Dersom du har sp&amp;oslash;rsm&amp;aring;l eller har bestilt feil, vennligst send oss en &lt;a href="mailto:mail@mail.mail"&gt;e-post&lt;/a&gt; med ordre IDen som emnefelt.';
  </code></pre>