I've created a contact form and a script which uses the mail() function to email the data entered.

My script appears to be functioning as I want, but two emails arrive at the destination inbox. The first email is from the default 'nobody' address of the Apache server, and the second email arrives with the correct email headers which I have specified.

Can anyone help me find why this is happening and how to stop it?