I'm in the process of customizing dp-error.php. I'm using the mail() function to alert me when there's a database connection problem on my website. The trouble is, what if 1000 people visit my website when it's down? Wouldn't I get 1000 emails? Here's the code I'm using to send email:
mail("email@example.com", "Database Error", "There is a problem with teh database!", "From: Your WP Installation"); ?>
My other question is then how would mail() know it's okay to send me a notification email in a future db error? After a certain period of time send again, if there's (still) an error?