Create a PHP page that will handle the 404 error. Call it 404.php and put it in the docroot directory.
$REDIRECT_URL will contain the requested url. Use the PHP mail() function to send yourself the message.
Add this line to your httpd.conf file:
ErrorDocument 404 /404.php
Restart Apache.