title: PHP mail, header and call to mail() function, what has override?
body: <p>I've been struggling with low level mail in PHP and I know I should be using a library for this, but that's not an option right now.</p>
  
  <p>When doing mail in PHP, you can manually set additional headers, like From, Cc and Bcc, but you can also set Subject, To and a Body. When you call the function you pass the headers along to the mail() function, but that function also "asks for" a Subject, body and To.</p>
  
  <p>My question then is: how does PHP handle the double intention in this? If you manually set the header to have Subject : foo, but then in the call to mail pass 'foo' along as the subject...?</p>
  
  <p>I can't read C, so opening up PHP source probably won't help me here.</p>
  
  <p>Thanks!</p>