title: Mail header to answer to a email with php
body: <p>My goal is to anwer to a mail to a email that is in a inbox of a mailbox.
  I am at the point that I can read the mail out of the mailbox and I can send emails.</p>
  
  <p>The only thing is that I would like it for the receiver of the email that all the conversations are wrapped in 1 email. You know with gmail you see for example a subject like this:</p>
  
  <pre><code>(5) Test subject
  </code></pre>
  
  <p>This means that this mails contains 5 submails.</p>
  
  <p>But at this point everytime I send a answer to the existing email with php it comes in as a completely new mail. And it does not stack on top of eachother.</p>
  
  <p>Does anyone know how to make these emails stack on eachother.</p>
  
  <p>My current code for sending the mail:</p>
  
  <pre><code>// To send HTML mail, the Content-type header must be set
  $headers  = "MIME-Version: 1.0 \r\n";
  $headers .= "Content-type: text/html; charset=iso-8859-1 \r\n";
  $headers .= "Reply-To: reply@reply.nl \r\n";
  
  // Additional headers
  $headers .= "From: sender@sender.nl\r\n";
  
  mail("test@test.nl", "test subject", "test message", $headers);
  </code></pre>