i may have misunderstood what you were trying to do, but i set up a test php page that seems to mail fine without some of the customizations you mention below.
here's a snip:
<?PHP
mail("xx@xxx.net", "Test Subject", "Test Body", "From: username@$SERVER_NAME"...