Better do as Maciej showed you and use Pear. It preserves you from several headaches using the mail() function directly. Also get clear which MTA you are really wanting to run; actually Sendmail seems to not be configured properly. And finally, using Apache to speak to the MTA directly will not work when SELinux is enabled.
Alexander
Thanks for the posts guys ;)
I found out Sendmail >8.12 has been re-modeled to tighten msp-queue rules.
Thus, internal processes send mails will go to msp-queue 1st. in /etc/mail/virtusrtable I removed @your-box-fqdn error:nouser No such user here
and every thing works now with out changing the mail() function
Best Regards, Jon McCauley