I'm going to be putting this script on a lot of hosts, and in an attempt to make my life easier, I was thinking that putting:

define("DEF_ALERT", "failmail@".$_SERVER['SERVER_NAME']);

in for the DEF_ALERT value, then setting up a failmail@[domain name] email address would keep me from having to dig into each script each time to set it up for the specific address.

I'd use a common central address, but I've found that there's some Sendmail restriction on my server that disallows script mailing to addresses on different domains. (Handy tip: If you're getting "everything is okay" from the script, but you're not getting the mail, check on this!)

I'm just wondering if this approach is safe, or if I'm setting myself up for exploits. Does anyone have any input?