Sending an email on an error might be a bad idea. We had this set up on a server that powers an API (along with our main site). During a network problem in the data center where the server could not get to the mysql, we had about 10,000 requests on the sever = 10,000 emails = the outlook guys having to reboot the exchange server because of some odd interaction with their spam filtering appliance.