Forum Moderators: coopster
Bring this question over to the PHP/PERL forum and I am sure you will get lots of help.
WBF
If the first, exactly how to trigger the script will vary depending on what mail server software you use. I think Red Hat still defaults to Sendmail - a mail server which can do anything, but about whose configuration I know relatively little. Regardless of the mail server, this approach would require a PHP script that can be executed from the command line rather than from the server. Conveniently, this is possible. Instead of your usual PHP script with lots of HTML in the middle, just do something like this:
#!/usr/bin/php
<?php
// PHP Code
?>
Then make the file executable, probably with 'chmod ug+x <filename>' or 'chmod a+x <filename>'.
Now you just have to figure out how to make your mail server call <filename> every time it sends a message out. For that piece of the puzzle, you might want to hop on over to the Linux, Unix, and *nix like Operating Systems [webmasterworld.com] forum. Feel like a ping-pong ball yet?