title: How to get mail message id from PHP before or after sending
body: <p>I want to keep track of users who assign emails as spam, then remove them from the mailing list, or just put notification to 0 for them, so they don't get emails anymore.</p>
  
  <p>Mail feedback loops help you do that, but they return the message with the message id only, they do not tell you which email address it was from.</p>
  
  <p><a href="http://www.unlocktheinbox.com/resources/feedbackloops/" rel="nofollow">http://www.unlocktheinbox.com/resources/feedbackloops/</a></p>
  
  <p>So I was wondering, how can I retrieve the message id from the mail which is sent with the PHP <code>mail()</code> function?</p>