php 5.3 was slotted to get better mail tracing, but I'm not sure if that happened. (edit: yes php 5.3 has logging built in now - php.ini has the config variable mail.log which will log use of mail from php code.)
We solved the problem by making sendmail a wrapper shell script.
In php.ini set a new mailer. E.g.:
sendmail_path = /usr/local/bin/sendmail-php -t -i
The sendmail-php script simply uses logger to get info, and then calls the system's sendmail:
#!/bin/bash logger -p mail.info -t sendmail-php "site=${HTTP_HOST}, client=${REMOTE_ADDR}, script=${SCRIPT_NAME}, filename=${SCRIPT_FILENAME}, docroot=${DOCUMENT_ROOT}, pwd=${PWD}, uid=${UID}, user=$(whoami)" /usr/sbin/sendmail -t -i $*
This will log to whatever your mail.info is set to in the syslog.conf file.
Another suggestion is to install suhosin php extension to tighten up loopholes in PHP, unless you are running Debian or Ubuntu where this is already the default.