More work on bug #7393.  The email function for critical errors now works.